diff --git a/launchbar/org.eclipse.launchbar.core.tests/.classpath b/launchbar/org.eclipse.launchbar.core.tests/.classpath new file mode 100644 index 00000000000..3e5654f17eb --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.classpath @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.core.tests/.gitignore b/launchbar/org.eclipse.launchbar.core.tests/.gitignore new file mode 100644 index 00000000000..ae3c1726048 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/launchbar/org.eclipse.launchbar.core.tests/.project b/launchbar/org.eclipse.launchbar.core.tests/.project new file mode 100644 index 00000000000..b553de43630 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.core.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..ad05599159f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..51a63ec9988 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=2 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.core.tests/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.core.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..7f04cfbdaaf --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/META-INF/MANIFEST.MF @@ -0,0 +1,10 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Launch Bar Core Tests +Bundle-SymbolicName: org.eclipse.launchbar.core.tests;singleton:=true +Bundle-Version: 1.0.0.qualifier +Fragment-Host: org.eclipse.launchbar.core;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.junit;bundle-version="4.12.0", + org.mockito;bundle-version="2.23.0" +Automatic-Module-Name: org.eclipse.launchbar.core.tests diff --git a/launchbar/org.eclipse.launchbar.core.tests/about.html b/launchbar/org.eclipse.launchbar.core.tests/about.html new file mode 100644 index 00000000000..164f781a8fd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

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

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core.tests/build.properties b/launchbar/org.eclipse.launchbar.core.tests/build.properties new file mode 100644 index 00000000000..e3023e14e99 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.xml diff --git a/launchbar/org.eclipse.launchbar.core.tests/fragment.xml b/launchbar/org.eclipse.launchbar.core.tests/fragment.xml new file mode 100644 index 00000000000..25d5965ecbc --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/fragment.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.core.tests/pom.xml b/launchbar/org.eclipse.launchbar.core.tests/pom.xml new file mode 100644 index 00000000000..80ada5c70ca --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/pom.xml @@ -0,0 +1,18 @@ + + + 4.0.0 + + + org.eclipse.launchbar + parent + 2.4.1-SNAPSHOT + ../../pom.xml + + + org.eclipse.launchbar.core.tests + 1.0.0-SNAPSHOT + + eclipse-test-plugin + diff --git a/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProviderTest.java b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProviderTest.java new file mode 100644 index 00000000000..c8c8158ed58 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProviderTest.java @@ -0,0 +1,309 @@ +/******************************************************************************* + * Copyright (c) 2015, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Elena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertSame; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.junit.After; +import org.junit.Before; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@FixMethodOrder(MethodSorters.JVM) +public class PerTargetLaunchConfigProviderTest { + private ILaunchTarget localTarget; + private String launchName; + private ILaunchTarget otherTarget; + private ILaunchConfigurationType launchConfigType; + private ILaunchDescriptorType descriptorType; + private ILaunchDescriptor descriptor; + private PerTargetLaunchConfigProvider1 provider; + + @Before + public void basicSetupOnly() { + ILaunchTargetManager targetManager = mock(ILaunchTargetManager.class); + Activator.getDefault().getBundle().getBundleContext().registerService(ILaunchTargetManager.class, targetManager, + null); + + localTarget = mock(ILaunchTarget.class); + doReturn("Local").when(localTarget).getId(); + doReturn(ILaunchTargetManager.localLaunchTargetTypeId).when(localTarget).getTypeId(); + doReturn(localTarget).when(targetManager).getLaunchTarget(ILaunchTargetManager.localLaunchTargetTypeId, + "Local"); + + // other mocked remote connections + otherTarget = mock(ILaunchTarget.class); + doReturn("otherTargetType").when(otherTarget).getTypeId(); + doReturn("otherTarget").when(otherTarget).getId(); + doReturn(otherTarget).when(targetManager).getLaunchTarget("otherTargetType", "otherTarget"); + + doReturn(new ILaunchTarget[] { localTarget, otherTarget }).when(targetManager).getLaunchTargets(); + + // launch stuff + launchName = "test"; + // launch config type + launchConfigType = getLaunchManager().getLaunchConfigurationType("org.eclipse.launchbar.core.tests.lctype1"); + // launch descriptor and type + descriptorType = mock(ILaunchDescriptorType.class); + descriptor = mock(ILaunchDescriptor.class); + doReturn(descriptorType).when(descriptor).getType(); + doReturn(launchName).when(descriptor).getName(); + // configProvider + provider = new PerTargetLaunchConfigProvider1(); + } + + private ILaunchManager getLaunchManager() { + return DebugPlugin.getDefault().getLaunchManager(); + } + + @After + public void after() throws CoreException { + ILaunchConfiguration[] launchConfigurations = getLaunchManager().getLaunchConfigurations(); + for (ILaunchConfiguration lc : launchConfigurations) { + lc.delete(); + } + } + + public class PerTargetLaunchConfigProvider1 extends PerTargetLaunchConfigProvider { + public static final String CONNECTION_NAME_ATTR = "connectionName"; + private ILaunchBarManager manager = mock(ILaunchBarManager.class); + + @Override + public boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws CoreException { + return true; + } + + @Override + public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + return launchConfigType; + } + + @Override + protected void populateLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target, + ILaunchConfigurationWorkingCopy workingCopy) throws CoreException { + super.populateLaunchConfiguration(descriptor, target, workingCopy); + workingCopy.setAttribute(CONNECTION_NAME_ATTR, target.getId()); + } + + @Override + protected ILaunchDescriptor getLaunchDescriptor(ILaunchConfiguration configuration) throws CoreException { + return descriptor; + } + + @Override + protected ILaunchTarget getLaunchTarget(ILaunchConfiguration configuration) throws CoreException { + String name = configuration.getAttribute(CONNECTION_NAME_ATTR, ""); + if (localTarget.getId().equals(name)) { + return localTarget; + } else if (otherTarget.getId().equals(name)) { + return otherTarget; + } else { + return null; + } + } + + @Override + protected ILaunchBarManager getManager() { + return manager; + } + + @Override + public ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + ILaunchConfiguration config = super.getLaunchConfiguration(descriptor, target); + // Since this provider isn't hooked in properly, need to manually + // add in the config + launchConfigurationAdded(config); + return config; + } + + } + + @Test + public void testPopulateLaunchConfiguration() throws CoreException { + ILaunchConfiguration launchConfig = launchConfigType.newInstance(null, launchName).doSave(); + ILaunchConfigurationWorkingCopy launchConfigWC = launchConfig.getWorkingCopy(); + provider.populateLaunchConfiguration(descriptor, localTarget, launchConfigWC); + assertTrue(provider.ownsLaunchConfiguration(launchConfigWC)); + } + + @Test + public void testOwnsLaunchConfiguration() throws CoreException { + ILaunchConfiguration launchConfig = launchConfigType.newInstance(null, launchName).doSave(); + assertFalse(provider.ownsLaunchConfiguration(launchConfig)); + ILaunchConfiguration launchConfiguration = provider.getLaunchConfiguration(descriptor, localTarget); + assertTrue(provider.ownsLaunchConfiguration(launchConfiguration)); + } + + @Test + public void testGetLaunchConfiguration() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, otherTarget); + assertNotNull(launchConfiguration1); + assertNotNull(launchConfiguration2); + assertNotEquals(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testGetLaunchConfigurationReuse() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertSame(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testGetLaunchConfigurationPersistance() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + // reset provider + provider = new PerTargetLaunchConfigProvider1(); + // simulate provider initialization on startup + provider.launchConfigurationAdded(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertEquals(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testGetTarget() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + assertSame(localTarget, provider.getLaunchTarget(launchConfiguration1)); + } + + @Test + public void testLaunchConfigurationRemoved() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + provider.launchConfigurationRemoved(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertNotEquals(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testLaunchConfigurationChanged_NotReallyChanged() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + provider.launchConfigurationChanged(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertSame(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testLaunchConfigurationChanged_Target() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + ILaunchConfigurationWorkingCopy wc = launchConfiguration1.getWorkingCopy(); + wc.setAttribute(PerTargetLaunchConfigProvider1.CONNECTION_NAME_ATTR, otherTarget.getId()); + wc.doSave(); + provider.launchConfigurationChanged(launchConfiguration1); + // provider.launchConfigurationChanged(lc3); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertNotEquals(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testLaunchConfigurationChanged_OrgName() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + ILaunchConfigurationWorkingCopy wc = launchConfiguration1.getWorkingCopy(); + wc.rename("blah"); + launchConfiguration1 = wc.doSave(); + provider.launchConfigurationChanged(launchConfiguration1); + // we should still maintain ownership on a rename + assertTrue(provider.ownsLaunchConfiguration(launchConfiguration1)); + // provider not hooked up properly to verify these. + // TODO not sure this test is valid as a result + // verify(provider.manager).launchConfigurationAdded(launchConfiguration1); + // verify(provider.manager).launchConfigurationRemoved(launchConfiguration1); + // have to fake out the remove + provider.launchConfigurationRemoved(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + assertNotEquals(launchConfiguration1, launchConfiguration2); + } + + @Test + public void testLaunchDescriptorRemoved() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration1); + provider.launchDescriptorRemoved(descriptor); + assertFalse(provider.ownsLaunchConfiguration(launchConfiguration1)); + assertFalse(launchConfiguration1.exists()); + } + + @Test + public void testLaunchDescriptorRemoved2() throws CoreException { + provider.launchDescriptorRemoved(descriptor); + } + + @Test + public void testLaunchTargetRemoved() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, otherTarget); + assertNotNull(launchConfiguration1); + provider.launchTargetRemoved(otherTarget); + assertFalse(launchConfiguration1.exists()); + } + + @Test + public void testLaunchTargetRemoved2() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, otherTarget); + assertNotNull(launchConfiguration1); + ILaunchConfiguration launchConfiguration2 = provider.getLaunchConfiguration(descriptor, localTarget); + assertNotNull(launchConfiguration2); + provider.launchTargetRemoved(otherTarget); + assertFalse(launchConfiguration1.exists()); + assertTrue(launchConfiguration2.exists()); + } + + @Test + public void testLaunchTargetRemoved3() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, otherTarget); + assertNotNull(launchConfiguration1); + provider.launchTargetRemoved(localTarget); + } + + @Test + public void testLCRemoved() throws CoreException { + ILaunchConfiguration launchConfiguration1 = provider.getLaunchConfiguration(descriptor, otherTarget); + assertNotNull(launchConfiguration1); + assertTrue(provider.ownsLaunchConfiguration(launchConfiguration1)); + launchConfiguration1.delete(); + provider.launchConfigurationRemoved(launchConfiguration1); + assertFalse(provider.ownsLaunchConfiguration(launchConfiguration1)); + } +} diff --git a/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManager2Test.java b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManager2Test.java new file mode 100644 index 00000000000..a214309bc32 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManager2Test.java @@ -0,0 +1,969 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Elena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.reset; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyZeroInteractions; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashSet; + +import org.eclipse.core.internal.preferences.EclipsePreferences; +import org.eclipse.core.internal.resources.Project; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.launchbar.core.DefaultLaunchConfigProvider; +import org.eclipse.launchbar.core.DefaultLaunchDescriptorType; +import org.eclipse.launchbar.core.ILaunchBarListener; +import org.eclipse.launchbar.core.ILaunchConfigurationProvider; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.ILaunchDescriptorType; +import org.eclipse.launchbar.core.ProjectLaunchDescriptor; +import org.eclipse.launchbar.core.ProjectPerTargetLaunchConfigProvider; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.junit.Before; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runners.MethodSorters; + +@SuppressWarnings({ "restriction" }) +@FixMethodOrder(MethodSorters.JVM) +public class LaunchBarManager2Test { + private LaunchBarManager manager; + private ILaunchConfigurationProvider provider; + private ILaunchDescriptor descriptor; + private ILaunchDescriptorType descriptorType; + private ILaunchConfigurationType launchConfigType; + private ILaunchConfiguration launchConfig; + private ILaunchManager lman; + private IProject aaa; + private ArrayList globalmodes = new ArrayList<>(); + IExtensionPoint point; + IEclipsePreferences store = new EclipsePreferences(); + private ArrayList elements; + private IExtension extension; + private String descriptorTypeId; + private ILaunchTargetManager targetManager; + private ILaunchTarget localTarget; + private String launchObject; + private ILaunchTarget otherTarget; + private ILaunchTarget[] targets; + + public class FixedLaunchBarManager extends LaunchBarManager { + public FixedLaunchBarManager() { + super(false); + } + + @Override + public IExtensionPoint getExtensionPoint() { + return point; + } + + @Override + protected ILaunchManager getLaunchManager() { + return lman; + } + + @Override + protected IEclipsePreferences getPreferenceStore() { + return store; + } + + @Override + ILaunchTargetManager getLaunchTargetManager() { + return targetManager; + } + } + + @Before + public void setUp() throws Exception { + basicSetup(); + } + + protected void mockProviderElement(String descriptorTypeId, int priority, ILaunchConfigurationProvider provider) + throws CoreException { + IConfigurationElement element = mockElementAndAdd("configProvider"); + doReturn(descriptorTypeId).when(element).getAttribute("descriptorType"); + doReturn(Integer.toString(priority)).when(element).getAttribute("priority"); + doReturn(provider).when(element).createExecutableExtension("class"); + } + + protected ILaunchConfigurationProvider mockConfigProviderElement(String descriptorTypeId, int priority, + ILaunchDescriptor descriptor, ILaunchTarget target, ILaunchConfiguration config, Object launchObj) + throws CoreException { + ILaunchConfigurationProvider provider = mock(ILaunchConfigurationProvider.class); + mockProviderElement(descriptorTypeId, priority, provider); + doReturn(config.getType()).when(provider).getLaunchConfigurationType(descriptor, target); + doReturn(config).when(provider).getLaunchConfiguration(descriptor, target); + doReturn(true).when(provider).supports(descriptor, target); + doReturn(true).when(provider).launchConfigurationAdded(config); + return provider; + } + + protected IConfigurationElement mockDescriptorTypeElement(String descriptorTypeId, int priority, + ILaunchDescriptorType descriptorType) throws CoreException { + IConfigurationElement element = mockElementAndAdd("descriptorType"); + doReturn(descriptorTypeId).when(element).getAttribute("id"); + doReturn(Integer.toString(priority)).when(element).getAttribute("priority"); + doReturn(descriptorType).when(element).createExecutableExtension("class"); + // TODO need a real enablement here, not an empty one + // mockEnablementElement(element); + return element; + } + + private void mockSubElement(IConfigurationElement parent, IConfigurationElement... elements) { + doReturn(elements).when(parent).getChildren(); + String name = elements[0].getName(); + doReturn(elements).when(parent).getChildren(name); + } + + private IConfigurationElement mockEnablementElement(IConfigurationElement parent) { + IConfigurationElement enablement = mock(IConfigurationElement.class); + doReturn("enablement").when(enablement).getName(); + mockSubElement(parent, new IConfigurationElement[] { enablement }); + return enablement; + } + + protected void init() throws CoreException { + doReturn(elements.toArray(new IConfigurationElement[0])).when(extension).getConfigurationElements(); + doReturn(targets).when(targetManager).getLaunchTargets(); + manager.init(); + } + + protected IConfigurationElement mockElementAndAdd(final String configElement) { + IConfigurationElement element = mock(IConfigurationElement.class); + doReturn(configElement).when(element).getName(); + elements.add(element); + return element; + } + + protected void mockLaunchObjectOnDescriptor(Object launchObject) throws CoreException { + doReturn(descriptor).when(descriptorType).getDescriptor(launchObject); + doReturn(launchObject.toString()).when(descriptor).getName(); + } + + private ILaunchConfiguration mockLC(String string, ILaunchConfigurationType lctype2) throws CoreException { + ILaunchConfiguration lc = mock(ILaunchConfiguration.class); + doReturn(string).when(lc).getName(); + doReturn(lctype2).when(lc).getType(); + doReturn("").when(lc).getAttribute(eq(ATTR_ORIGINAL_NAME), eq("")); + doReturn("").when(lc).getAttribute(eq(ATTR_PROVIDER_CLASS), eq("")); + return lc; + } + + protected ILaunchConfigurationType mockLCType(String id) { + ILaunchConfigurationType lctype = mock(ILaunchConfigurationType.class); + doReturn(true).when(lctype).isPublic(); + doReturn(id).when(lctype).getIdentifier(); + doReturn(lctype).when(lman).getLaunchConfigurationType(id); + return lctype; + } + + protected ILaunchMode[] mockLaunchModes(ILaunchConfigurationType type, String... modes) { + ILaunchMode res[] = new ILaunchMode[modes.length]; + for (int i = 0; i < modes.length; i++) { + String modeId = modes[i]; + doReturn(true).when(type).supportsMode(modeId); + ILaunchMode mode = mock(ILaunchMode.class); + res[i] = mode; + doReturn(modeId).when(mode).getIdentifier(); + doReturn(mode).when(lman).getLaunchMode(modeId); + globalmodes.add(mode); + } + doReturn(new HashSet<>(Arrays.asList(modes))).when(type).getSupportedModes(); + doReturn(globalmodes.toArray(new ILaunchMode[globalmodes.size()])).when(lman).getLaunchModes(); + return res; + } + + /** + * @param t2 + * @return + */ + private ILaunchTarget mockRemoteConnection(String t2) { + ILaunchTarget target = mock(ILaunchTarget.class); + doReturn(t2).when(target).getTypeId(); + doReturn(t2 + ".target").when(target).getId(); + return target; + } + + class ConfigBasedLaunchDescriptor extends PlatformObject implements ILaunchDescriptor { + private ILaunchConfiguration conf; + private ILaunchDescriptorType type; + + public ConfigBasedLaunchDescriptor(ILaunchDescriptorType type, ILaunchConfiguration conf) { + this.conf = conf; + this.type = type; + } + + @Override + public T getAdapter(Class adapter) { + if (adapter.isInstance(conf)) + return adapter.cast(conf); + return super.getAdapter(adapter); + } + + @Override + public String getName() { + return conf.getName(); + } + + @Override + public ILaunchDescriptorType getType() { + return type; + } + } + + private void basicSetup() throws CoreException { + basicSetupOnly(); + init(); + } + + protected void basicSetupOnly() throws CoreException { + globalmodes.clear(); + point = mock(IExtensionPoint.class); + extension = mock(IExtension.class); + elements = new ArrayList<>(); + doReturn(new IExtension[] { extension }).when(point).getExtensions(); + lman = mock(ILaunchManager.class); + doReturn(globalmodes.toArray(new ILaunchMode[globalmodes.size()])).when(lman).getLaunchModes(); + doReturn(new ILaunchConfiguration[] {}).when(lman).getLaunchConfigurations(); + targetManager = mock(ILaunchTargetManager.class); + manager = new FixedLaunchBarManager(); + localTarget = mock(ILaunchTarget.class); + doReturn(ILaunchTargetManager.localLaunchTargetTypeId).when(localTarget).getTypeId(); + doReturn("Local").when(localTarget).getId(); + // mock + launchObject = "test"; + // remote connections + otherTarget = mock(ILaunchTarget.class); + doReturn("otherTargetType").when(otherTarget).getTypeId(); + doReturn("otherTarget").when(otherTarget).getId(); + targets = new ILaunchTarget[] { otherTarget, localTarget }; + // lc + String launchConfigTypeId = "lctype1"; + launchConfigType = mockLCType(launchConfigTypeId); + launchConfig = mockLC(launchObject, launchConfigType); + // launch config type + mockLaunchModes(launchConfigType, "run", "debug"); + // launch descriptor and type + descriptorType = mock(ILaunchDescriptorType.class); + descriptorTypeId = "descType"; + mockDescriptorTypeElement(descriptorTypeId, 10, descriptorType); + descriptor = mock(ILaunchDescriptor.class); + doReturn(descriptorType).when(descriptor).getType(); + doReturn(descriptor).when(descriptorType).getDescriptor(launchObject); + // configProvider + provider = mockConfigProviderElement(descriptorTypeId, 10, descriptor, otherTarget, launchConfig, launchObject); + mockLaunchObjectOnDescriptor(launchObject); + // default descriptor + String defaultDescTypeId = "defaultDescType"; + mockDescriptorTypeElement(defaultDescTypeId, 0, new DefaultLaunchDescriptorType()); + ILaunchConfigurationProvider defaultProvider = new DefaultLaunchConfigProvider(); + mockProviderElement(defaultDescTypeId, 0, defaultProvider); + } + + @Test + public void testDescriptor() throws Exception { + // Create a descriptor type and inject an associated object + // Make sure the descriptor is active with the local target and proper + // mode + // Make sure the associated launch config is active too + // Mocking + manager.launchObjectAdded(launchObject); + assertEquals(descriptor, manager.getActiveLaunchDescriptor()); + assertEquals(otherTarget, manager.getActiveLaunchTarget()); + assertEquals(launchConfig, manager.getActiveLaunchConfiguration()); + assertNotNull(manager.getActiveLaunchMode()); + assertEquals("run", manager.getActiveLaunchMode().getIdentifier()); + } + + @Test + public void testLaunchBarManager() { + assertNull(manager.getActiveLaunchDescriptor()); + assertNull(manager.getActiveLaunchTarget()); + assertNull(manager.getActiveLaunchMode()); + } + + @Test + public void testAddConfigMappingTwo() throws CoreException { + basicSetupOnly(); + ILaunchTarget target = mockRemoteConnection("t2"); + mockConfigProviderElement(descriptorTypeId, 10, descriptor, target, launchConfig, launchObject); + // now create another lc type, which is not registered in config type + ILaunchConfigurationType lctype2 = mockLCType("lctypeid2"); + ILaunchConfiguration lc2 = mockLC("bla2", lctype2); + ConfigBasedLaunchDescriptor desc2 = new ConfigBasedLaunchDescriptor(descriptorType, lc2); + mockConfigProviderElement(descriptorTypeId, 10, desc2, target, lc2, lc2); + init(); + manager.launchObjectAdded(launchObject); + // it return original lctype because we did not associate this + // dynmaically + assertEquals(launchConfigType, manager.getLaunchConfigurationType(descriptor, target)); + } + + @Test + public void testAddConfigProviderTwo2() throws CoreException { + basicSetupOnly(); + ILaunchTarget target = mockRemoteConnection("t2"); + mockConfigProviderElement(descriptorTypeId, 15, descriptor, target, launchConfig, launchObject); + ILaunchConfigurationType lctype2 = mockLCType("lctypeid2"); + ILaunchConfiguration lc2 = mockLC("lc2", lctype2); + mockConfigProviderElement(descriptorTypeId, 20, descriptor, target, lc2, launchObject); + init(); + manager.launchObjectAdded(launchObject); + assertEquals(lctype2, manager.getLaunchConfigurationType(descriptor, target)); + } + + @Test + public void testGetLaunchTargets() throws CoreException { + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + ILaunchTarget[] launchTargets = manager.getLaunchTargets(descriptor); + assertEquals(1, launchTargets.length); + assertEquals(otherTarget, launchTargets[0]); + } + + @Test + public void testGetLaunchTargetsNoConfigMapping() throws CoreException { + basicSetupOnly(); + elements.clear(); + mockDescriptorTypeElement(descriptorTypeId, 10, descriptorType); + mockProviderElement(descriptorTypeId, 10, new DefaultLaunchConfigProvider()); + init(); + manager.launchObjectAdded(launchObject); + ILaunchDescriptor desc = manager.getActiveLaunchDescriptor(); + ILaunchTarget[] launchTargets = manager.getLaunchTargets(desc); + assertEquals(1, launchTargets.length); + } + + @Test + public void testGetLaunchTargetsConfigMapping() throws CoreException { + basicSetupOnly(); + elements.clear(); + mockDescriptorTypeElement(descriptorTypeId, 10, descriptorType); + mockConfigProviderElement(descriptorTypeId, 10, descriptor, localTarget, launchConfig, launchObject); + init(); + manager.launchObjectAdded(launchObject); + ILaunchDescriptor desc = manager.getActiveLaunchDescriptor(); + ILaunchTarget[] launchTargets = manager.getLaunchTargets(desc); + assertEquals(1, launchTargets.length); + } + + @Test + public void testGetLaunchDescriptorsNull() { + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(0, launchDescriptors.length); + } + + @Test + public void testGetLaunchDescriptorsNull1() throws CoreException { + init(); + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(0, launchDescriptors.length); + } + + @Test + public void testGetLaunchDescriptors() { + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(1, launchDescriptors.length); + } + + // + // public void testGetLaunchDescriptorsSort() { + // final ILaunchDescriptor res[] = new ILaunchDescriptor[1]; + // manager.addTargetType(targetType); + // ConfigBasedLaunchDescriptorType descType1 = new + // ConfigBasedLaunchDescriptorType("id1", lctype.getIdentifier()); + // ConfigBasedLaunchDescriptorType descType2 = new + // ConfigBasedLaunchDescriptorType("id2", lctype.getIdentifier()) { + // @Override + // public ILaunchDescriptor getDescriptor(Object element) { + // return res[0] = super.getDescriptor(element); + // } + // }; + // ConfigBasedLaunchDescriptorType descType3 = new + // ConfigBasedLaunchDescriptorType("id3", lctype.getIdentifier()); + // manager.addDescriptorType(descType1, 3); + // manager.addDescriptorType(descType2, 5); + // manager.addDescriptorType(descType3, 1); + // manager.addConfigProvider(descType1.getId(), targetType.getId(), true, + // provider); + // manager.addConfigProvider(descType2.getId(), targetType.getId(), true, + // provider); + // manager.addConfigProvider(descType3.getId(), targetType.getId(), true, + // provider); + // targetType.targets.add(mytarget); + // manager.launchObjectAdded(launchObject); + // ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + // assertEquals(1, launchDescriptors.length); + // assertNotNull(launchDescriptors[0]); + // assertSame(res[0], launchDescriptors[0]); + // } + // + @Test + public void testLaunchObjectAdded() throws CoreException { + mockLaunchObjectOnDescriptor(launchConfig); + doReturn(launchConfig.getName()).when(descriptor).getName(); + manager.launchObjectAdded(launchObject); + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(1, launchDescriptors.length); + assertNotNull(launchDescriptors[0]); + assertEquals(launchConfig.getName(), launchDescriptors[0].getName()); + } + + @Test + public void testLaunchConfigurationAdded() throws CoreException { + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + ILaunchConfiguration lc2 = mockLC("lc2", launchConfigType); + manager.launchConfigurationAdded(lc2); + assertEquals(2, manager.getLaunchDescriptors().length); + } + + @Test + public void testLaunchObjectChanged() throws CoreException { + // todo FIX me + manager.launchObjectChanged(launchObject); + } + + public IProject mockProject(String projectName) { + IProject project = mock(Project.class); + when(project.getAdapter(IResource.class)).thenReturn(project); + when(project.getProject()).thenReturn(project); + when(project.getName()).thenReturn(projectName); + IPath path = new Path(projectName); + when(project.getFullPath()).thenReturn(path); + when(project.getType()).thenReturn(IResource.PROJECT); + return project; + } + + public static final String ATTR_PROJECT_NAME = "org.eclipse.cdt.launch" + ".PROJECT_ATTR"; + public static final String ATTR_PROGRAM_NAME = "org.eclipse.cdt.launch" + ".PROGRAM_NAME"; + + public ILaunchConfiguration mockLCProject(ILaunchConfiguration lc, String projectName) { + mockLCAttribute(lc, ATTR_PROJECT_NAME, projectName); + return lc; + } + + public ILaunchConfiguration mockLCProject(ILaunchConfiguration lc, IProject project) { + String projectName = project.getName(); + doReturn(projectName).when(lc).getName(); + mockLCProject(lc, projectName); + try { + doReturn(new IResource[] { project }).when(lc).getMappedResources(); + } catch (CoreException e) { + throw new RuntimeException(e); + } + return lc; + } + + public ILaunchConfiguration mockLCBinary(ILaunchConfiguration lc, String binname) { + mockLCAttribute(lc, ATTR_PROGRAM_NAME, binname); + return lc; + } + + public ILaunchConfiguration mockLCAttribute(ILaunchConfiguration lc, String attr, String value) { + try { + doReturn(value).when(lc).getAttribute(eq(attr), anyString()); + } catch (CoreException e) { + throw new RuntimeException(e); + } + return lc; + } + + public ILaunchConfiguration mockLCAttribute(ILaunchConfiguration lc, String attr, boolean value) { + try { + doReturn(value).when(lc).getAttribute(attr, false); + } catch (CoreException e) { + throw new RuntimeException(e); + } + return lc; + } + + protected String getProjectName(ILaunchConfiguration llc) { + try { + return llc.getAttribute(ATTR_PROJECT_NAME, ""); + } catch (CoreException e) { + // + } + return ""; + } + + IProject getProjectByName(String p) { + if (p.equals("aaa")) + return aaa; + return mockProject(p); + } + + protected void userDeletesLC(ILaunchConfiguration lc2) { + String string = lc2.getName(); + reset(lc2); + doReturn(string).when(lc2).getName(); + manager.launchConfigurationRemoved(lc2); + } + + public class ProjectBasedLaunchDescriptorType implements ILaunchDescriptorType { + @Override + public ILaunchDescriptor getDescriptor(Object launchObject) throws CoreException { + return new ProjectLaunchDescriptor(this, (IProject) launchObject); + } + + public String getId() { + return "pbtype"; + } + } + + public static final String ATTR_ORIGINAL_NAME = org.eclipse.launchbar.core.internal.Activator.PLUGIN_ID + + ".originalName"; //$NON-NLS-1$ + public static final String ATTR_PROVIDER_CLASS = org.eclipse.launchbar.core.internal.Activator.PLUGIN_ID + + ".providerClass"; //$NON-NLS-1$ + + protected void projectMappingSetup() throws CoreException { + descriptorType = new ProjectBasedLaunchDescriptorType(); + descriptorTypeId = ((ProjectBasedLaunchDescriptorType) descriptorType).getId(); + aaa = mockProject("aaa"); + descriptor = new ProjectLaunchDescriptor(descriptorType, aaa); + // setup some stuff + mockDescriptorTypeElement(descriptorTypeId, 10, descriptorType); + // lc = provider.createLaunchConfiguration(lman, + // descType.getDescriptor(aaa)); + mockLCProject(launchConfig, aaa); + mockLCAttribute(launchConfig, ATTR_ORIGINAL_NAME, aaa.getName()); + assertEquals(0, manager.getLaunchDescriptors().length); + provider = new ProjectPerTargetLaunchConfigProvider() { + @Override + public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, + ILaunchTarget target) throws CoreException { + return launchConfigType; + } + + @Override + public boolean ownsLaunchConfiguration(ILaunchConfiguration configuration) throws CoreException { + return configuration == launchConfig; + } + + @Override + protected ILaunchDescriptor getLaunchDescriptor(ILaunchConfiguration configuration) throws CoreException { + return descriptor; + } + + @Override + protected ILaunchTarget getLaunchTarget(ILaunchConfiguration configuration) throws CoreException { + return localTarget; + } + }; + mockProviderElement(descriptorTypeId, 10, provider); + mockLCAttribute(launchConfig, ATTR_PROVIDER_CLASS, provider.getClass().getName()); + init(); + } + + /** + * Test duplicating a config. make sure it's default desc and same targets + */ + @Test + public void testLaunchObjectAddedRemapping() throws CoreException { + projectMappingSetup(); + // user created a project + manager.launchObjectAdded(aaa); + assertEquals(1, manager.getLaunchDescriptors().length); + assertTrue(manager.getLaunchDescriptors()[0].getName().startsWith(aaa.getName())); + // user clicked on descriptor gear to edit lc, new lc is created + manager.launchConfigurationAdded(launchConfig); + // the project launch config should have caught this + assertEquals(1, manager.getLaunchDescriptors().length); + assertEquals(launchConfig.getName(), manager.getLaunchDescriptors()[0].getName()); + // user cloned lc and changed some settings + ILaunchConfiguration lc2 = mockLC("lc2", launchConfigType); + mockLCProject(lc2, aaa); + doReturn("name2").when(lc2).getName(); + manager.launchConfigurationAdded(lc2); + assertEquals(2, manager.getLaunchDescriptors().length); + // user deleted lc + userDeletesLC(lc2); + assertEquals(1, manager.getLaunchDescriptors().length); + // user deleted last lc, now we back to project default + userDeletesLC(launchConfig); + assertEquals(1, manager.getLaunchDescriptors().length); + } + + @Test + public void testLaunchObjectAddedRemapping2() throws CoreException { + projectMappingSetup(); + // test unmapping + manager.launchObjectAdded(aaa); + manager.launchConfigurationAdded(launchConfig); + assertEquals(1, manager.getLaunchDescriptors().length); + manager.launchObjectAdded(aaa); + assertEquals(1, manager.getLaunchDescriptors().length); + assertEquals(launchConfig.getName(), manager.getLaunchDescriptors()[0].getName()); + } + + @Test + public void testLaunchObjectAddedBadDescriptor() throws CoreException { + doThrow(new NullPointerException()).when(descriptorType).getDescriptor(any()); + // check events + manager.launchObjectAdded(launchObject); + verify(descriptorType).getDescriptor(launchObject); + } + + @Test + public void testLaunchObjectAddedBadDescriptor2() throws CoreException { + doThrow(new NullPointerException()).when(descriptorType).getDescriptor(any()); + // check events + manager.launchObjectAdded(launchObject); + verify(descriptorType).getDescriptor(launchObject); + } + + @Test + public void testLaunchObjectRemoveBadDescriptor() throws CoreException { + doThrow(new NullPointerException()).when(descriptorType).getDescriptor(any()); + // check events + manager.launchObjectRemoved(launchObject); + } + + @Test + public void testLaunchObjectRemoved() throws CoreException { + manager.launchObjectAdded(launchObject); + assertEquals(1, manager.getLaunchDescriptors().length); + manager.launchObjectRemoved(launchObject); + assertEquals(0, manager.getLaunchDescriptors().length); + } + + @Test + public void testGetActiveLaunchDescriptor() { + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + manager.launchObjectAdded(launchObject); + // manager.setActiveLaunchDescriptor(desc); + assertEquals(descriptor, manager.getActiveLaunchDescriptor()); + verify(lis).activeLaunchDescriptorChanged(descriptor); + } + + @Test + public void testSetActiveLaunchDescriptorUnkn() { + try { + manager.setActiveLaunchDescriptor(descriptor); + fail(); + } catch (Exception e) { + // pass + } + } + + @Test + public void testSetActiveLaunchDescriptorNullBad() throws CoreException { + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(null); + assertEquals(descriptor, manager.getActiveLaunchDescriptor()); + } + + @Test + public void testSetActiveLaunchDescriptorLisBad() { + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + doThrow(new NullPointerException()).when(lis).activeLaunchDescriptorChanged(any(ILaunchDescriptor.class)); + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + verify(lis).activeLaunchDescriptorChanged(descriptor); + } + + @Test + public void testSetActiveLaunchDescriptorNull() throws CoreException { + manager.launchObjectAdded(launchObject); + manager.launchObjectRemoved(launchObject); + assertEquals(null, manager.getActiveLaunchDescriptor()); + manager.setActiveLaunchDescriptor(null); + } + + @Test + public void testGetLaunchModes() throws CoreException { + ILaunchMode[] launchModes = manager.getLaunchModes(); + assertEquals(0, launchModes.length); + } + + @Test + public void testGetLaunchModesFew() throws CoreException { + globalmodes.clear(); + ILaunchConfigurationType lctype2 = mockLCType("lctype2"); + mockLaunchModes(lctype2, "modex"); + mockLaunchModes(launchConfigType, "run", "debug", "foo"); + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + ILaunchMode[] launchModes = manager.getLaunchModes(); + assertEquals(3, launchModes.length); + } + + @Test + public void testSetActiveLaunchMode() throws CoreException { + ILaunchMode mode = mock(ILaunchMode.class); + doReturn("bla").when(mode).getIdentifier(); + doReturn("Bla").when(mode).getLabel(); + manager.setActiveLaunchMode(mode); + assertEquals(mode, manager.getActiveLaunchMode()); + } + + @Test + public void testSetActiveLaunchModeNull() throws CoreException { + manager.setActiveLaunchMode(null); + assertEquals(null, manager.getActiveLaunchMode()); + } + + @Test + public void testSetActiveLaunchModeNull2() throws CoreException { + ILaunchMode modes[] = mockLaunchModes(launchConfigType, "run", "debug", "foo"); + manager.setActiveLaunchMode(modes[0]); + manager.setActiveLaunchMode(null); + assertEquals(null, manager.getActiveLaunchMode()); + } + + @Test + public void testSetActiveLaunchModeUnsupported() { + ILaunchConfigurationType lctype2 = mockLCType("lctype2"); + ILaunchMode mode = mockLaunchModes(lctype2, "modex")[0]; + mockLaunchModes(launchConfigType, "run", "debug", "foo"); + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + try { + manager.setActiveLaunchMode(mode); + fail(); + } catch (Exception e) { + // works + assertNotEquals(mode, manager.getActiveLaunchMode()); + } + } + + @Test + public void testSetActiveLaunchModeLis() throws CoreException { + ILaunchMode mode = mock(ILaunchMode.class); + doReturn("bla").when(mode).getIdentifier(); + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + manager.setActiveLaunchMode(mode); + manager.setActiveLaunchMode(null); + verify(lis, times(1)).activeLaunchModeChanged(mode); + verify(lis, times(1)).activeLaunchModeChanged(null); + } + + @Test + public void testSetActiveLaunchModeLisBad() throws CoreException { + ILaunchMode mode = mock(ILaunchMode.class); + doReturn("bla").when(mode).getIdentifier(); + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + doThrow(new NullPointerException()).when(lis).activeLaunchModeChanged(mode); + manager.setActiveLaunchMode(mode); + verify(lis).activeLaunchModeChanged(mode); + } + + @Test + public void testGetActiveLaunchModeFromDesc() throws CoreException { + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + ILaunchMode resmode = manager.getActiveLaunchMode(); + assertNotNull(resmode); + assertEquals("run", resmode.getIdentifier()); + } + + @Test + public void testGetActiveLaunchModeFromDescDebug() throws CoreException { + globalmodes.clear(); + mockLaunchModes(launchConfigType, "xrun"); + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + ILaunchMode resmode = manager.getActiveLaunchMode(); + assertNotNull(resmode); + assertEquals("xrun", resmode.getIdentifier()); + } + + @Test + public void testGetActiveLaunchModeFromDescActive() throws CoreException { + globalmodes.clear(); + ILaunchMode mode = mockLaunchModes(launchConfigType, "foo", "run")[0]; + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + manager.setActiveLaunchMode(mode); + ILaunchMode resmode = manager.getActiveLaunchMode(); + assertNotNull(resmode); + assertEquals("foo", resmode.getIdentifier()); + } + + @Test + public void testGetActiveLaunchTarget() throws CoreException { + manager.setActiveLaunchTarget(localTarget); + assertEquals(localTarget, manager.getActiveLaunchTarget()); + } + + @Test + public void testGetLaunchConfigurationType() throws CoreException { + manager.launchObjectAdded(launchObject); + assertNotNull(manager.getLaunchConfigurationType(descriptor, otherTarget)); + } + + @Test + public void testGetLaunchConfigurationNull() throws CoreException { + assertNull(manager.getLaunchConfiguration(null, otherTarget)); + } + + @Test + public void testGetLaunchConfigurationNull2() throws CoreException { + manager.launchObjectAdded(launchObject); + assertNull(manager.getLaunchConfiguration(descriptor, null)); + } + + @Test + public void testGetLaunchConfiguration() throws CoreException { + basicSetup(); + manager.launchObjectAdded(launchObject); + assertTrue(manager.supportsTarget(descriptor, otherTarget)); + assertNotNull(manager.getLaunchConfiguration(descriptor, otherTarget)); + } + + @Test + public void testAddListener() throws CoreException { + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + // check events + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + verify(lis).activeLaunchTargetChanged(any(ILaunchTarget.class)); + } + + @Test + public void testAddListenerBad() throws CoreException { + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + doThrow(new NullPointerException()).when(lis).activeLaunchTargetChanged(any(ILaunchTarget.class)); + // check events + manager.launchObjectAdded(launchObject); + manager.setActiveLaunchDescriptor(descriptor); + verify(lis).activeLaunchTargetChanged(any(ILaunchTarget.class)); + } + + @Test + public void testRemoveListener() { + ILaunchBarListener lis = mock(ILaunchBarListener.class); + manager.addListener(lis); + manager.removeListener(lis); + verifyZeroInteractions(lis); + } + + @Test + public void testLaunchConfigurationAdded2() throws CoreException { + globalmodes.clear(); + ILaunchMode mode = mockLaunchModes(launchConfigType, "foo")[0]; + manager.launchObjectAdded(launchObject); + manager.launchConfigurationAdded(launchConfig); + verify(provider).launchConfigurationAdded(launchConfig); + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(1, launchDescriptors.length); + assertNotNull(launchDescriptors[0]); + assertEquals(launchConfig.getName(), launchDescriptors[0].getName()); + manager.setActiveLaunchDescriptor(launchDescriptors[0]); + assertEquals(otherTarget, manager.getActiveLaunchTarget()); + assertEquals(mode, manager.getActiveLaunchMode()); + } + + @Test + public void testLaunchConfigurationAddedDefault() throws CoreException { + // another lc not covered by provider + ILaunchConfigurationType lctype2 = mockLCType("lctype2"); + ILaunchConfiguration lc2 = mockLC("lc2", lctype2); + manager.launchConfigurationAdded(lc2); + // verify(provider).launchConfigurationAdded(lc2); + ILaunchDescriptor[] launchDescriptors = manager.getLaunchDescriptors(); + assertEquals(1, launchDescriptors.length); + assertNotNull(launchDescriptors[0]); + assertEquals(lc2.getName(), launchDescriptors[0].getName()); + manager.setActiveLaunchDescriptor(launchDescriptors[0]); + assertEquals(localTarget, manager.getActiveLaunchTarget()); + } + + @Test + public void testLaunchConfigurationAddedBad() throws CoreException { + doThrow(new NullPointerException()).when(provider).launchConfigurationAdded(any(ILaunchConfiguration.class)); + manager.launchConfigurationAdded(launchConfig); + verify(provider).launchConfigurationAdded(launchConfig); + } + + @Test + public void testLaunchConfigurationChanged() throws CoreException { + manager.launchConfigurationChanged(launchConfig); + verify(provider).launchConfigurationChanged(launchConfig); + } + + @Test + public void testLaunchConfigurationRemoved() throws CoreException { + manager.launchConfigurationRemoved(launchConfig); + verify(provider).launchConfigurationRemoved(launchConfig); + } + + @Test + public void testLaunchConfigurationRemovedBad() throws CoreException { + doThrow(new NullPointerException()).when(provider).launchConfigurationRemoved(any(ILaunchConfiguration.class)); + manager.launchConfigurationRemoved(launchConfig); + verify(provider).launchConfigurationRemoved(launchConfig); + } + + @Test + public void testDescriptorEnablement() throws CoreException { + basicSetupOnly(); + elements.clear(); + + IConfigurationElement element = mockDescriptorTypeElement("type2", 10, descriptorType); + IConfigurationElement enablement = mockEnablementElement(element); + IConfigurationElement instance = mock(IConfigurationElement.class); + doReturn("instanceof").when(instance).getName(); + mockSubElement(enablement, new IConfigurationElement[] { instance }); + doReturn("java.lang.Integer").when(instance).getAttribute("value"); + init(); + // this will be refused by enablement expression + assertNull(manager.launchObjectAdded(launchObject)); + // we programmatically refuse this + assertNull(manager.launchObjectAdded(1)); + mockLaunchObjectOnDescriptor(1); + // now we both good programmatically and in expression in extension + assertNotNull(manager.launchObjectAdded(1)); + } + +} diff --git a/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManagerTest.java b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManagerTest.java new file mode 100644 index 00000000000..cbcd097520c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/LaunchBarManagerTest.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.launchbar.core.ILaunchConfigurationProvider; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.ILaunchDescriptorType; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.junit.Test; + +public class LaunchBarManagerTest { + @Test + public void startupTest() throws Exception { + // Make sure the manager starts up and defaults everything to null + LaunchBarManager manager = new LaunchBarManager(false); + manager.init(); + assertNull(manager.getActiveLaunchDescriptor()); + assertNull(manager.getActiveLaunchMode()); + assertNull(manager.getActiveLaunchTarget()); + } + + @Test + public void defaultTest() throws Exception { + // Create a launch config, make sure default mode and local target are + // active + // And that that config is the active config. + + // Mocking + ILaunchConfigurationType launchConfigType = mock(ILaunchConfigurationType.class); + ILaunchConfiguration launchConfig = mock(ILaunchConfiguration.class); + String launchConfigName = "launchConfig"; + doReturn(launchConfigName).when(launchConfig).getName(); + doReturn(launchConfigName).when(launchConfig).getAttribute(eq("org.eclipse.launchbar.core.originalName"), + anyString()); + doReturn("").when(launchConfig).getAttribute(eq("org.eclipse.launchbar.core.providerClass"), anyString()); + doReturn(true).when(launchConfigType).isPublic(); + doReturn(launchConfigType).when(launchConfig).getType(); + doReturn("launchConfigType").when(launchConfigType).getIdentifier(); + doReturn(true).when(launchConfigType).supportsMode("run"); + doReturn(true).when(launchConfigType).supportsMode("debug"); + + final ILaunchTargetManager targetManager = mock(ILaunchTargetManager.class); + ILaunchTarget localTarget = mock(ILaunchTarget.class); + doReturn(ILaunchTargetManager.localLaunchTargetTypeId).when(localTarget).getTypeId(); + doReturn("Local").when(localTarget).getId(); + doReturn(new ILaunchTarget[] { localTarget }).when(targetManager).getLaunchTargets(); + + // Inject the launch config + LaunchBarManager manager = new LaunchBarManager(false) { + @Override + ILaunchTargetManager getLaunchTargetManager() { + return targetManager; + } + }; + manager.init(); + manager.launchConfigurationAdded(launchConfig); + + // Verify state + assertNotNull(manager.getActiveLaunchDescriptor()); + assertEquals(launchConfig, manager.getActiveLaunchDescriptor().getAdapter(ILaunchConfiguration.class)); + + assertNotNull(manager.getActiveLaunchTarget()); + assertEquals(ILaunchTargetManager.localLaunchTargetTypeId, manager.getActiveLaunchTarget().getTypeId()); + assertEquals("Local", manager.getActiveLaunchTarget().getId()); + + assertNotNull(manager.getActiveLaunchMode()); + assertEquals("run", manager.getActiveLaunchMode().getIdentifier()); + + assertEquals(launchConfig, manager.getActiveLaunchConfiguration()); + } + + @Test + public void descriptorTest() throws Exception { + // Create a descriptor type and inject an associated object + // Make sure the descriptor is active with the local target and proper + // mode + // Make sure the associated launch config is active too + + // Mocking + final IExtensionPoint extensionPoint = mock(IExtensionPoint.class); + IExtension extension = mock(IExtension.class); + doReturn(new IExtension[] { extension }).when(extensionPoint).getExtensions(); + + List elements = new ArrayList<>(); + IConfigurationElement element; + + // fake launch object + String launchObject = "fakeObject"; + + // launch descriptor for that object + element = mock(IConfigurationElement.class); + elements.add(element); + doReturn("descriptorType").when(element).getName(); + String descriptorTypeId = "fakeDescriptorType"; + doReturn(descriptorTypeId).when(element).getAttribute("id"); + ILaunchDescriptorType descriptorType = mock(ILaunchDescriptorType.class); + doReturn(descriptorType).when(element).createExecutableExtension("class"); + ILaunchDescriptor descriptor = mock(ILaunchDescriptor.class); + doReturn(descriptor).when(descriptorType).getDescriptor(launchObject); + doReturn(descriptorType).when(descriptor).getType(); + doReturn(launchObject).when(descriptor).getName(); + + // launch config type + final ILaunchManager launchManager = mock(ILaunchManager.class); + ILaunchMode runMode = mock(ILaunchMode.class); + String run = "run"; + doReturn(run).when(runMode).getIdentifier(); + doReturn(runMode).when(launchManager).getLaunchMode(run); + ILaunchMode debugMode = mock(ILaunchMode.class); + String debug = "debug"; + doReturn(debug).when(debugMode).getIdentifier(); + doReturn(debugMode).when(launchManager).getLaunchMode(debug); + doReturn(new ILaunchMode[] { runMode, debugMode }).when(launchManager).getLaunchModes(); + ILaunchConfigurationType launchConfigType = mock(ILaunchConfigurationType.class); + String launchConfigTypeId = "fakeLaunchConfigType"; + doReturn(launchConfigTypeId).when(launchConfigType).getIdentifier(); + doReturn(true).when(launchConfigType).supportsMode(run); + doReturn(true).when(launchConfigType).supportsMode(debug); + doReturn(launchConfigType).when(launchManager).getLaunchConfigurationType(launchConfigTypeId); + // TODO assuming this is only called at init time when there aren't any + doReturn(new ILaunchConfiguration[0]).when(launchManager).getLaunchConfigurations(); + + // configProvider + element = mock(IConfigurationElement.class); + elements.add(element); + doReturn("configProvider").when(element).getName(); + doReturn(descriptorTypeId).when(element).getAttribute("descriptorType"); + doReturn("10").when(element).getAttribute("priority"); + + ILaunchConfigurationProvider configProvider = mock(ILaunchConfigurationProvider.class); + doReturn(configProvider).when(element).createExecutableExtension("class"); + + final ILaunchTargetManager targetManager = mock(ILaunchTargetManager.class); + ILaunchTarget localTarget = mock(ILaunchTarget.class); + doReturn(ILaunchTargetManager.localLaunchTargetTypeId).when(localTarget).getTypeId(); + doReturn("Local").when(localTarget).getId(); + doReturn(new ILaunchTarget[] { localTarget }).when(targetManager).getLaunchTargets(); + + ILaunchConfiguration launchConfig = mock(ILaunchConfiguration.class); + doReturn(launchConfig).when(configProvider).getLaunchConfiguration(eq(descriptor), any(ILaunchTarget.class)); + doReturn(launchConfigType).when(configProvider).getLaunchConfigurationType(any(ILaunchDescriptor.class), + any(ILaunchTarget.class)); + doAnswer(invocation -> { + ILaunchTarget target = (ILaunchTarget) invocation.getArguments()[1]; + return target.getTypeId().equals(ILaunchTargetManager.localLaunchTargetTypeId); + }).when(configProvider).supports(eq(descriptor), any(ILaunchTarget.class)); + + doReturn(elements.toArray(new IConfigurationElement[0])).when(extension).getConfigurationElements(); + + // Now inject the launch object + LaunchBarManager manager = new LaunchBarManager(false) { + @Override + IExtensionPoint getExtensionPoint() throws CoreException { + return extensionPoint; + } + + @Override + ILaunchManager getLaunchManager() { + return launchManager; + } + + @Override + ILaunchTargetManager getLaunchTargetManager() { + return targetManager; + } + + }; + manager.init(); + manager.launchObjectAdded(launchObject); + + assertEquals(descriptor, manager.getActiveLaunchDescriptor()); + assertEquals(runMode, manager.getActiveLaunchMode()); + assertEquals(ILaunchTargetManager.localLaunchTargetTypeId, manager.getActiveLaunchTarget().getTypeId()); + assertEquals("Local", manager.getActiveLaunchTarget().getId()); + assertEquals(launchConfig, manager.getActiveLaunchConfiguration()); + } + + // TODO - test that changing active target type produces a different launch + // config type + // TODO - test that settings are maintained after a restart + // TODO - test that two target types that map to the same desc type and + // config type share configs + // TODO - test duplicating a config. make sure it's default desc and same + // targets + // TODO - test project descriptors and stuff + // TODO - test descriptor takeovers (new descriptors on launchObjectChange + +} diff --git a/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/target/LaunchTargetTest.java b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/target/LaunchTargetTest.java new file mode 100644 index 00000000000..3afd94b95c0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/internal/target/LaunchTargetTest.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright (c) 2016, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.osgi.service.prefs.Preferences; + +public class LaunchTargetTest { + private org.osgi.service.prefs.Preferences pref; + + @Before + public void setUp() { + pref = Mockito.mock(Preferences.class); + } + + @Test + public void testRemoveLaunchTarget() { + ILaunchTargetManager manager = Activator.getLaunchTargetManager(); + // Account for pre-populated targets + int baseSize = manager.getLaunchTargets().length; + ILaunchTarget target1 = manager.addLaunchTarget("mytype", "target1"); + ILaunchTarget target2 = manager.addLaunchTarget("mytype", "target2"); + Set targetSet = new HashSet<>(Arrays.asList(manager.getLaunchTargets())); + assertEquals(baseSize + 2, targetSet.size()); + assertTrue(targetSet.contains(target1)); + assertTrue(targetSet.contains(target2)); + manager.removeLaunchTarget(target2); + targetSet = new HashSet<>(Arrays.asList(manager.getLaunchTargets())); + assertEquals(baseSize + 1, targetSet.size()); + assertTrue(targetSet.contains(target1)); + assertFalse(targetSet.contains(target2)); + manager.removeLaunchTarget(target1); + targetSet = new HashSet<>(Arrays.asList(manager.getLaunchTargets())); + assertEquals(baseSize, targetSet.size()); + assertFalse(targetSet.contains(target1)); + assertFalse(targetSet.contains(target2)); + } + + @Test + public void testEquals() { + LaunchTarget t1 = new LaunchTarget("a", "b", pref); + LaunchTarget t2 = new LaunchTarget("a", "b", pref); + assertEquals(t1, t2); + LaunchTarget t3 = new LaunchTarget("a", "a", pref); + assertNotEquals(t1, t3); + LaunchTarget t4 = new LaunchTarget("b", "a", pref); + assertNotEquals(t4, t3); + assertNotEquals(t4, null); + } + + @Test + public void testEqualsHashode() { + LaunchTarget t1 = new LaunchTarget("a", "b", pref); + LaunchTarget t2 = new LaunchTarget("a", "b", pref); + assertEquals(t1.hashCode(), t2.hashCode()); + } + + @Test + public void testBasic() { + LaunchTarget t1 = new LaunchTarget("a", "b", pref); + ILaunchTarget save = t1.getWorkingCopy().save(); + assertEquals(t1, save); + } + + @Test + public void testNullTarget() { + ILaunchTarget nt = ILaunchTarget.NULL_TARGET; + assertEquals("b", nt.getAttribute("a", "b")); + } + + @Test(expected = NullPointerException.class) + public void testNPEInConstrPref() { + new LaunchTarget("a", "b", null); + } + + @Test(expected = NullPointerException.class) + public void testNPEInConstrType() { + new LaunchTarget(null, "b", pref); + } + + @Test(expected = NullPointerException.class) + public void testNPEInConstrId() { + new LaunchTarget("type", null, pref); + } + + @Test(expected = UnsupportedOperationException.class) + public void testWConNULL() { + ILaunchTarget nt = ILaunchTarget.NULL_TARGET; + nt.getWorkingCopy(); + } +} diff --git a/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/tests/TargetAttributesTest.java b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/tests/TargetAttributesTest.java new file mode 100644 index 00000000000..d29dfbe2086 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core.tests/src/org/eclipse/launchbar/core/tests/TargetAttributesTest.java @@ -0,0 +1,46 @@ +package org.eclipse.launchbar.core.tests; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; + +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy; +import org.junit.Test; + +public class TargetAttributesTest { + + @Test + public void testAttribute() { + ILaunchTargetManager manager = Activator.getLaunchTargetManager(); + String targetType = "testType"; + String targetId = "testTarget"; + String attributeKey = "testKey"; + String attributeValue = "testValue"; + // Make sure the target doesn't exist + ILaunchTarget target = manager.getLaunchTarget(targetType, targetId); + if (target != null) { + manager.removeLaunchTarget(target); + } + // Add the target + target = manager.addLaunchTarget(targetType, targetId); + // Attribute should be empty + assertEquals(target.getAttribute(attributeKey, ""), ""); + // Set the attribute and make sure it's set + ILaunchTargetWorkingCopy wc = target.getWorkingCopy(); + assertNotEquals(target, wc); + wc.setAttribute(attributeKey, attributeValue); + assertEquals(wc.getAttribute(attributeKey, ""), attributeValue); + ILaunchTarget savedTarget = wc.save(); + // Make sure we get our original back + assertEquals(target, savedTarget); + assertEquals(target.getAttribute(attributeKey, ""), attributeValue); + // Make sure remove removes the attribute + manager.removeLaunchTarget(target); + target = manager.addLaunchTarget(targetType, targetId); + assertEquals(target.getAttribute(attributeKey, ""), ""); + // Cleanup + manager.removeLaunchTarget(target); + } +} diff --git a/launchbar/org.eclipse.launchbar.core/.classpath b/launchbar/org.eclipse.launchbar.core/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.core/.gitignore b/launchbar/org.eclipse.launchbar.core/.gitignore new file mode 100644 index 00000000000..ae3c1726048 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/launchbar/org.eclipse.launchbar.core/.options b/launchbar/org.eclipse.launchbar.core/.options new file mode 100644 index 00000000000..e66b4dfa81e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.options @@ -0,0 +1,2 @@ +org.eclipse.launchbar.core/debug=true +org.eclipse.launchbar.core/debug/launchbar=true diff --git a/launchbar/org.eclipse.launchbar.core/.project b/launchbar/org.eclipse.launchbar.core/.project new file mode 100644 index 00000000000..6c8a7469162 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2b6ecff8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +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.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..d2dc703ba9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.core/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.core/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..e3465955719 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LaunchBar Core +Bundle-SymbolicName: org.eclipse.launchbar.core;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.launchbar.core.internal.Activator +Bundle-Vendor: Eclipse CDT +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.debug.core, + org.eclipse.core.expressions +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.launchbar.core, + org.eclipse.launchbar.core.internal;x-friends:="org.eclipse.launchbar.core.tests,org.eclipse.launchbar.ui", + org.eclipse.launchbar.core.target, + org.eclipse.launchbar.core.target.launch +Automatic-Module-Name: org.eclipse.launchbar.core diff --git a/launchbar/org.eclipse.launchbar.core/about.html b/launchbar/org.eclipse.launchbar.core/about.html new file mode 100644 index 00000000000..164f781a8fd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

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

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core/build.properties b/launchbar/org.eclipse.launchbar.core/build.properties new file mode 100644 index 00000000000..e34cf111400 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + about.html,\ + schema/ diff --git a/launchbar/org.eclipse.launchbar.core/plugin.xml b/launchbar/org.eclipse.launchbar.core/plugin.xml new file mode 100644 index 00000000000..207ec12cd0a --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/plugin.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.core/schema/launchBarContributions.exsd b/launchbar/org.eclipse.launchbar.core/schema/launchBarContributions.exsd new file mode 100644 index 00000000000..6fa1fe86532 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/schema/launchBarContributions.exsd @@ -0,0 +1,208 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A descriptor represents an object that can be converted into a launch configuration. The typical example is IProject. Launch configurations can be created that launch the build output of the project. + + + + + + + + + + Global descriptor type id. I.e. com.example.mytype + + + + + + + Priority of the descriptor, values from 1 to 100. +Lower values represent lower priority. +I.e. descriptor with priority 10 will override +descriptor with priority 5. Priority 0 is reserved for default descriptor. + + + + + + + Class that implements ILaunchDescriptorType + + + + + + + + + + + + + Descriptor types and target types map to a launch configuration type. Configurations of that type knows how to launch for the desciptor on targets of that type. + + + + + + + + + + Id of the descriptor type defined in descriptorType element (can be from another extension) + + + + + + + + + + Priority of the provider, values from 1 to 100. +Lower values represent lower priority. +I.e. provider with priority 10 will be checked before +provider with priority 5. Priority 0 is reserved for default provider. + + + + + + + Class that implements ILaunchConfigurationProvider + + + + + + + + + + Does the descriptor managed by this config provider support the null target. + + + + + + + + + + Object providers pump launch objects into the model as they are created and removed. These are used to create descriptors for these objects. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/launchbar/org.eclipse.launchbar.core/schema/launchTargetTypes.exsd b/launchbar/org.eclipse.launchbar.core/schema/launchTargetTypes.exsd new file mode 100644 index 00000000000..290bf844499 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/schema/launchTargetTypes.exsd @@ -0,0 +1,109 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/AbstractLaunchConfigProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/AbstractLaunchConfigProvider.java new file mode 100644 index 00000000000..c6eb02e0978 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/AbstractLaunchConfigProvider.java @@ -0,0 +1,80 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * Common launch config provider. Manages creating launch configurations and + * ensuring duplicates are managed properly. + */ +public abstract class AbstractLaunchConfigProvider implements ILaunchConfigurationProvider { + + private static final String ATTR_ORIGINAL_NAME = Activator.PLUGIN_ID + ".originalName"; //$NON-NLS-1$ + private static final String ATTR_PROVIDER_CLASS = Activator.PLUGIN_ID + ".providerClass"; //$NON-NLS-1$ + + protected ILaunchConfiguration createLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); + String name = launchManager.generateLaunchConfigurationName(descriptor.getName()); + ILaunchConfigurationType type = getLaunchConfigurationType(descriptor, target); + ILaunchConfigurationWorkingCopy workingCopy = type.newInstance(null, name); + + populateLaunchConfiguration(descriptor, target, workingCopy); + + return workingCopy.doSave(); + } + + protected void populateLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target, + ILaunchConfigurationWorkingCopy workingCopy) throws CoreException { + // Leave our breadcrumb + workingCopy.setAttribute(ATTR_ORIGINAL_NAME, workingCopy.getName()); + workingCopy.setAttribute(ATTR_PROVIDER_CLASS, getClass().getName()); + } + + @Override + public boolean launchDescriptorMatches(ILaunchDescriptor descriptor, ILaunchConfiguration configuration, + ILaunchTarget target) throws CoreException { + ILaunchConfiguration lc = descriptor.getAdapter(ILaunchConfiguration.class); + if (lc == null) + return false; + return configuration.getName().equals(lc.getName()); + } + + protected boolean ownsLaunchConfiguration(ILaunchConfiguration configuration) throws CoreException { + if (!configuration.exists()) { + // can't own it if it doesn't exist + return false; + } + + if (configuration.getAttribute(ATTR_PROVIDER_CLASS, "").equals(getClass().getName())) { //$NON-NLS-1$ + // We provided the configuration but we need to check if this is a duplicate and + // not own it. Check the original name and if there is still a config with that + // name, this is the duplicate. Otherwise it's simply a rename + String origName = configuration.getAttribute(ATTR_ORIGINAL_NAME, ""); //$NON-NLS-1$ + return origName.equals(configuration.getName()) + || !DebugPlugin.getDefault().getLaunchManager().isExistingLaunchConfigurationName(origName); + } else { + return false; + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchConfigProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchConfigProvider.java new file mode 100644 index 00000000000..73ec61eb8f9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchConfigProvider.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; + +/** + * The launch config provider for the default descriptor which is the launch + * config itself. + * + * Override this class and register an extension if you want to support targets + * other than the local connection. + */ +public class DefaultLaunchConfigProvider implements ILaunchConfigurationProvider { + @Override + public boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws CoreException { + // Only supports Local connection + return target != null && target.getTypeId().equals(ILaunchTargetManager.localLaunchTargetTypeId); + } + + @Override + public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + return descriptor.getAdapter(ILaunchConfiguration.class).getType(); + } + + @Override + public ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + return descriptor.getAdapter(ILaunchConfiguration.class); + } + + @Override + public boolean launchConfigurationAdded(ILaunchConfiguration configuration) throws CoreException { + // return false so that the configuration can become a launch object + return false; + } + + @Override + public boolean launchConfigurationChanged(ILaunchConfiguration configuration) throws CoreException { + return false; + } + + @Override + public boolean launchConfigurationRemoved(ILaunchConfiguration configuration) throws CoreException { + return false; + } + + @Override + public void launchDescriptorRemoved(ILaunchDescriptor descriptor) throws CoreException { + // nothing to do + } + + @Override + public void launchTargetRemoved(ILaunchTarget target) throws CoreException { + // nothing to do + } + + @Override + public boolean launchDescriptorMatches(ILaunchDescriptor descriptor, ILaunchConfiguration configuration, + ILaunchTarget target) throws CoreException { + ILaunchConfiguration lc = descriptor.getAdapter(ILaunchConfiguration.class); + if (lc == null) + return false; + return configuration.getName().equals(lc.getName()); + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptor.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptor.java new file mode 100644 index 00000000000..4dba61e0916 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptor.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2014, 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.debug.core.ILaunchConfiguration; + +/** + * A special launch descriptor that managed configurations that aren't owned by other + * descriptors. + * + * @since 2.3 + */ +public class DefaultLaunchDescriptor extends PlatformObject implements ILaunchDescriptor { + + private final ILaunchDescriptorType type; + private final ILaunchConfiguration configuration; + + public DefaultLaunchDescriptor(ILaunchDescriptorType type, ILaunchConfiguration configuration) { + this.type = type; + this.configuration = configuration; + } + + @Override + public T getAdapter(Class adapter) { + if (ILaunchConfiguration.class.equals(adapter)) { + return adapter.cast(configuration); + } + + T obj = configuration.getAdapter(adapter); + if (obj != null) { + return obj; + } + + return super.getAdapter(adapter); + } + + @Override + public String getName() { + return configuration.getName(); + } + + @Override + public ILaunchDescriptorType getType() { + return type; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptorType.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptorType.java new file mode 100644 index 00000000000..0d1bcfaef9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/DefaultLaunchDescriptorType.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.launchbar.core.internal.Activator; + +/** + * A special descriptor type that managed configurations that aren't owned by + * other descriptor types. + * + * @since 2.3 + */ +public class DefaultLaunchDescriptorType implements ILaunchDescriptorType { + + public static final String ID = Activator.PLUGIN_ID + ".descriptorType.default"; //$NON-NLS-1$ + + private Map descriptors = new HashMap<>(); + + @Override + public boolean supportsTargets() throws CoreException { + // Old style launch configs do not support targets. + // Though if yours does, you can always subclass and override this. + return false; + } + + /** + * Used to filter out private and external tools builders + * + * @param config + * @return + * @throws CoreException + */ + public static boolean isPublic(ILaunchConfiguration config) throws CoreException { + ILaunchConfigurationType type = config.getType(); + if (type == null) { + return false; + } + + String category = type.getCategory(); + + return type.isPublic() && !(config.getAttribute(ILaunchManager.ATTR_PRIVATE, false)) + && !("org.eclipse.ui.externaltools.builder".equals(category)); // $NON-NLS-1$ + } + + @Override + public ILaunchDescriptor getDescriptor(Object launchObject) { + if (launchObject instanceof ILaunchConfiguration) { + ILaunchConfiguration config = (ILaunchConfiguration) launchObject; + try { + if (isPublic(config)) { + DefaultLaunchDescriptor descriptor = descriptors.get(config); + if (descriptor == null) { + descriptor = new DefaultLaunchDescriptor(this, config); + descriptors.put(config, descriptor); + } + return descriptor; + } + } catch (CoreException ce) { + Activator.log(ce.getStatus()); + } + } + + return null; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarListener.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarListener.java new file mode 100644 index 00000000000..a7800174345 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarListener.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * Listener that can be installed on launch bar to listen for state changes. + * {@link ILaunchBarManager#addListener(ILaunchBarListener)}. + * + * + * Activator.getService(ILaunchBarManager.class).addListener(new ILaunchBarListener(){ + * public void activeLaunchTargetChanged(ILaunchTarget target) { + * // do something + * } + * }); + * + */ +public interface ILaunchBarListener { + default void activeLaunchDescriptorChanged(ILaunchDescriptor descriptor) { + } + + default void activeLaunchModeChanged(ILaunchMode mode) { + } + + default void activeLaunchTargetChanged(ILaunchTarget target) { + } + + default void launchTargetsChanged() { + } +} \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarManager.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarManager.java new file mode 100644 index 00000000000..44121189c75 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchBarManager.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationListener; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * Interface to the Launch Bar Manager. + * + * @noimplement This interface is not intended to be implemented by clients. + */ +public interface ILaunchBarManager extends ILaunchConfigurationListener { + + /** + * A launch object has been added. Create a matching launch descriptor if + * available. + * + * @param element launch object + * @return the launch descriptor that got created, null of none was + * @throws CoreException + */ + ILaunchDescriptor launchObjectAdded(Object launchObject) throws CoreException; + + /** + * A launch object has been removed. Remove the associated launch descriptor if + * there is one. + * + * @param element launch object + * @throws CoreException + */ + void launchObjectRemoved(Object launchObject) throws CoreException; + + /** + * A launch object has changed in some way that affects the launch bar. + * + * @param launchObject + * @throws CoreException + */ + void launchObjectChanged(Object launchObject) throws CoreException; + + /** + * Add a listener that can react to launch bar changes + * + * @param listener + */ + void addListener(ILaunchBarListener listener); + + /** + * Remove a listener + * + * @param listener + */ + void removeListener(ILaunchBarListener listener); + + /** + * Return the type id for the given launch descriptor type. This is defined in + * the extension point that defines the type. + * + * @param descType descriptor type + * @return the type id for the descriptor type + */ + String getDescriptorTypeId(ILaunchDescriptorType descType) throws CoreException; + + /** + * Returns the active launch descriptor. + * + * @return active launch descriptor + * @throws CoreException + */ + ILaunchDescriptor getActiveLaunchDescriptor() throws CoreException; + + /** + * Returns the active launch mode. + * + * @return active launch mode + * @throws CoreException + */ + ILaunchMode getActiveLaunchMode() throws CoreException; + + /** + * Returns the active launch target. + * + * @return active launch target + * @throws CoreException + */ + ILaunchTarget getActiveLaunchTarget() throws CoreException; + + /** + * Returns the active launch configuration as derived from the active descriptor + * and target. + * + * @return active launch configuration + * @throws CoreException + */ + ILaunchConfiguration getActiveLaunchConfiguration() throws CoreException; + + /** + * Returns the launch configuration derived from the given launch descriptor and + * target. + * + * @param desc launch descriptor + * @param target launch target + * @return launch configuration + * @throws CoreException + */ + ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor desc, ILaunchTarget target) throws CoreException; + + /** + * Returns the launch configuration type used for configurations that are + * derived from the given launch descriptor and launch target without creating a + * launch configuration. + * + * @param desc launch descriptor + * @param target launch target + * @return launch configuration type + * @throws CoreException + */ + ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor desc, ILaunchTarget target) + throws CoreException; + + /** + * Returns all know launch descriptors. + * + * @return launch descriptors + * @throws CoreException + */ + ILaunchDescriptor[] getLaunchDescriptors() throws CoreException; + + /** + * Set the active launch descriptor. + * + * @param desc launch descriptor + * @throws CoreException + */ + void setActiveLaunchDescriptor(ILaunchDescriptor desc) throws CoreException; + + /** + * Return all launch modes for the active launch descriptor and active launch target. + * + * @return launch modes + * @throws CoreException + */ + ILaunchMode[] getLaunchModes() throws CoreException; + + /** + * Set the active launch mode. + * + * @param mode launch mode + * @throws CoreException + */ + void setActiveLaunchMode(ILaunchMode mode) throws CoreException; + + /** + * Return all launch targets supported by the given launch descriptor. + * + * @param desc launch descriptor + * @return launch targets + * @throws CoreException + */ + ILaunchTarget[] getLaunchTargets(ILaunchDescriptor desc) throws CoreException; + + /** + * Set the active launch target. + * + * @param target launch target + * @throws CoreException + */ + void setActiveLaunchTarget(ILaunchTarget target) throws CoreException; + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchConfigurationProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchConfigurationProvider.java new file mode 100644 index 00000000000..5cabc260af5 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchConfigurationProvider.java @@ -0,0 +1,134 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * QNX Software Systems - initial + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * The provider of launch configurations of a given type for a given descriptor + * type and a given target type. + * + * It is recommended to extend {@link AbstractLaunchConfigProvider} or one of + * it's subclasses instead of implementing this directly. + */ +public interface ILaunchConfigurationProvider { + /** + * Does this config provider provide launch configurations for the + * combination of descriptor and target. + * + * Note: this is called when filtering targets for a descriptor. Processing + * should be minimal. + * + * @param descriptor + * @param target + * @return true if target is supported, false otherwise. + */ + boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws CoreException; + + /** + * Return the launch configuation type for the descriptor and target. + * + * @param descriptor + * @param target + * launch configuration type or null if not supported + * @return + * @throws CoreException + */ + ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException; + + /** + * Create a launch configuration for the descriptor to launch on the target. + * + * @param descriptor + * the descriptor to create the config for + * @param target + * the target to launch the config on + * @return launch configuration + * @throws CoreException + */ + ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException; + + /** + * Return true if given descriptor is associated with given launch configuration. + * I.e. if getLaunchConfiguration(descriptor, target) returns a launch configuration, + * calling launchDescriptorMatches(descriptor, configuration, target) should return true. + * + * This method is used to activate descriptor when launch happens, return false all the time would mean + * launch would track launches of this specific descriptor (if they occur outside of launchbar). + * @param configuration + * launch configuration in question + * @param target - target to match, it can be null if launch bar cannot determine target, + * in this case it should act as wildcard + * + * @return launch configuration + * @throws CoreException + */ + boolean launchDescriptorMatches(ILaunchDescriptor descriptor, ILaunchConfiguration configuration, + ILaunchTarget target) throws CoreException; + + /** + * A launch configuration has been added. Provider can inspect it and + * associate with internal map. Provider should make sure it owns this + * launch configuration or it can modify it to take over. + * + * @return true of provider owns this launch configuration + */ + boolean launchConfigurationAdded(ILaunchConfiguration configuration) throws CoreException; + + /** + * A launch configuration has been removed. This notification can be used to + * purge internal cache for example. This method is called after launch + * configuration has been removed from file system, so accessing its + * attributes won't work. If provider cannot determine if it owns it it + * should return false. + * + * @param configuration + * @return true if provider owns this launch configuration + * @throws CoreException + */ + boolean launchConfigurationRemoved(ILaunchConfiguration configuration) throws CoreException; + + /** + * A launch configuration has been changed. Provider can inspect it to + * re-evaluate its internal map. Provider should make sure it owns this + * launch configuration or it can modify it to take over. + * + * @return true of provider owns this launch configuration + */ + boolean launchConfigurationChanged(ILaunchConfiguration configuration) throws CoreException; + + /** + * A launch descriptor has been removed. Remove any launch configurations + * that were created for it. + * + * @param descriptor + * @throws CoreException + */ + void launchDescriptorRemoved(ILaunchDescriptor descriptor) throws CoreException; + + /** + * A launch target has been removed. Remove any launch configurations that + * were created for it. + * + * @param target + * @throws CoreException + */ + void launchTargetRemoved(ILaunchTarget target) throws CoreException; + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptor.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptor.java new file mode 100644 index 00000000000..3aa0753f496 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptor.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.IAdaptable; + +/** + * Represents a thing that can be launched. It is good practice that the + * descriptor is adaptable to the launch object it is representing. + */ +public interface ILaunchDescriptor extends IAdaptable { + + /** + * Name to show in the launch descriptor selector. Names must be unique for + * all descriptors of a given type. + * + * @return name of the launch descriptor + */ + String getName(); + + /** + * The type of launch descriptor. + * + * @return provider + */ + ILaunchDescriptorType getType(); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java new file mode 100644 index 00000000000..2167f83bfd2 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchDescriptorType.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; + +/** + * Provides mapping between launch objects and launch descriptors. + */ +public interface ILaunchDescriptorType { + + /** + * Return a descriptor for the given launch object. + * + * May return null to essentially eat the element so no other types create a + * descriptor for it. + * + * The enablement expression for a given launch object must pass for this + * clause to be executed. + * + * @param descriptor + * launch object for descriptor + * @return the best descriptor + * @throws CoreException + */ + ILaunchDescriptor getDescriptor(Object launchObject) throws CoreException; + + /** + * Does this descriptor type support launching on targets other than Local? + * + * @return supports targets + * @throws CoreException + * @since 2.1 + */ + default boolean supportsTargets() throws CoreException { + return true; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchObjectProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchObjectProvider.java new file mode 100644 index 00000000000..3dd7cf02b43 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ILaunchObjectProvider.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.runtime.CoreException; + +/** + * An extension that serves up objects to feed launch descriptors. + * + */ +public interface ILaunchObjectProvider { + + /** + * Add initial launch objects and set up listeners for new ones. + * + * @param launchbar + * manager + * @throws CoreException + */ + void init(ILaunchBarManager manager) throws CoreException; + + /** + * Shutting down, remove any listeners. + */ + void dispose(); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProvider.java new file mode 100644 index 00000000000..eeb4a317c1e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/PerTargetLaunchConfigProvider.java @@ -0,0 +1,171 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +public abstract class PerTargetLaunchConfigProvider extends AbstractLaunchConfigProvider { + private final Map> configMap = new HashMap<>(); + private final Map defaultConfigs = new HashMap<>(); + private final Collection ownedConfigs = new LinkedHashSet<>(); + + protected ILaunchBarManager getManager() { + return Activator.getService(ILaunchBarManager.class); + } + + @Override + public ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + if (target != null) { + Map targetMap = configMap.get(descriptor); + if (targetMap != null) { + ILaunchConfiguration config = targetMap.get(target); + if (config != null) { + return config; + } + } + } else { + ILaunchConfiguration config = defaultConfigs.get(descriptor); + if (config != null) { + return config; + } + } + + // The config will get added to the cache when launchConfigurationAdded + // is called when the new config is saved. + return createLaunchConfiguration(descriptor, target); + } + + protected abstract ILaunchDescriptor getLaunchDescriptor(ILaunchConfiguration configuration) throws CoreException; + + protected abstract ILaunchTarget getLaunchTarget(ILaunchConfiguration configuration) throws CoreException; + + protected boolean providesForNullTarget() { + return false; + } + + private boolean addLaunchConfiguration(ILaunchConfiguration configuration) throws CoreException { + ILaunchDescriptor desc = getLaunchDescriptor(configuration); + if (desc == null) { + return false; + } + + ILaunchTarget target = getLaunchTarget(configuration); + if (target == null) { + if (providesForNullTarget()) { + defaultConfigs.put(desc, configuration); + } else { + return false; + } + } else { + Map targetMap = configMap.get(desc); + if (targetMap == null) { + targetMap = new HashMap<>(); + configMap.put(desc, targetMap); + } + targetMap.put(target, configuration); + } + + ownedConfigs.add(configuration); + return true; + } + + @Override + public boolean launchConfigurationAdded(ILaunchConfiguration configuration) throws CoreException { + if (ownsLaunchConfiguration(configuration)) { + return addLaunchConfiguration(configuration); + } + return false; + } + + @Override + public boolean launchConfigurationChanged(ILaunchConfiguration configuration) throws CoreException { + if (ownsLaunchConfiguration(configuration)) { + // clear cache, target could have changed + launchConfigurationRemoved(configuration); + return addLaunchConfiguration(configuration); + } else if (ownedConfigs.contains(configuration)) { + // something changed that will cause us to loose ownership of this + // configuration. Remove and add it back in. + ILaunchBarManager manager = getManager(); + manager.launchConfigurationRemoved(configuration); + manager.launchConfigurationAdded(configuration); + return true; + } else { + return false; + } + } + + @Override + public boolean launchConfigurationRemoved(ILaunchConfiguration configuration) throws CoreException { + ownedConfigs.remove(configuration); + for (Entry> descEntry : configMap.entrySet()) { + for (Entry targetEntry : descEntry.getValue().entrySet()) { + if (targetEntry.getValue().equals(configuration)) { + descEntry.getValue().remove(targetEntry.getKey()); + if (descEntry.getValue().isEmpty()) { + configMap.remove(descEntry.getKey()); + } + return true; + } + } + } + return false; + } + + @Override + public void launchDescriptorRemoved(ILaunchDescriptor descriptor) throws CoreException { + Map map = configMap.remove(descriptor); + if (map != null) { + for (ILaunchConfiguration config : map.values()) { + ownedConfigs.remove(config); + // remove all auto-configs associated with descriptor + config.delete(); + } + } + + ILaunchConfiguration config = defaultConfigs.remove(descriptor); + if (config != null) { + ownedConfigs.remove(config); + config.delete(); + } + } + + @Override + public void launchTargetRemoved(ILaunchTarget target) throws CoreException { + for (Iterator>> iterator = configMap + .entrySet().iterator(); iterator.hasNext();) { + Entry> descEntry = iterator.next(); + Map map = descEntry.getValue(); + ILaunchConfiguration config = map.remove(target); + if (config != null) { + // remove all auto-configs associated with target + config.delete(); + } + if (map.isEmpty()) { + iterator.remove(); + } + } + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchConfigProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchConfigProvider.java new file mode 100644 index 00000000000..03b66ee9ada --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchConfigProvider.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +public abstract class ProjectLaunchConfigProvider extends AbstractLaunchConfigProvider { + + private Map configs = new HashMap<>(); + + @Override + public ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + ILaunchConfiguration config = null; + IProject project = descriptor.getAdapter(IProject.class); + if (project != null) { + config = configs.get(project); + if (config == null) { + config = createLaunchConfiguration(descriptor, target); + // launch config added will get called below to add it to the + // configs map + } + } + return config; + } + + @Override + protected void populateLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target, + ILaunchConfigurationWorkingCopy workingCopy) throws CoreException { + super.populateLaunchConfiguration(descriptor, target, workingCopy); + + // Set the project + workingCopy.setMappedResources(new IResource[] { descriptor.getAdapter(IProject.class) }); + } + + @Override + public boolean launchConfigurationAdded(ILaunchConfiguration configuration) throws CoreException { + if (ownsLaunchConfiguration(configuration)) { + IProject project = configuration.getMappedResources()[0].getProject(); + configs.put(project, configuration); + return true; + } + return false; + } + + @Override + public boolean launchConfigurationRemoved(ILaunchConfiguration configuration) throws CoreException { + for (Entry entry : configs.entrySet()) { + if (configuration.equals(entry.getValue())) { + configs.remove(entry.getKey()); + return true; + } + } + return false; + } + + @Override + public boolean launchConfigurationChanged(ILaunchConfiguration configuration) throws CoreException { + return false; + } + + @Override + public void launchDescriptorRemoved(ILaunchDescriptor descriptor) throws CoreException { + IProject project = descriptor.getAdapter(IProject.class); + if (project != null) { + configs.remove(project); + } + } + + @Override + public void launchTargetRemoved(ILaunchTarget target) throws CoreException { + // nothing to do since this provider isn't associated with a single + // target. + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchDescriptor.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchDescriptor.java new file mode 100644 index 00000000000..de161cc97e4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectLaunchDescriptor.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.PlatformObject; + +/** + * A reusable descriptor for wrapping projects that can be used by descriptor + * types that map to projects. + */ +public class ProjectLaunchDescriptor extends PlatformObject implements ILaunchDescriptor { + + private final ILaunchDescriptorType type; + private final IProject project; + + public ProjectLaunchDescriptor(ILaunchDescriptorType type, IProject project) { + this.type = type; + this.project = project; + } + + @Override + public T getAdapter(Class adapter) { + if (IProject.class.equals(adapter)) { + return adapter.cast(project); + } + return super.getAdapter(adapter); + } + + @Override + public String getName() { + return project.getName(); + } + + @Override + public ILaunchDescriptorType getType() { + return type; + } + + @Override + public String toString() { + return getName(); // for debugging purposes + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((project == null) ? 0 : project.hashCode()); + result = prime * result + ((type == null) ? 0 : type.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectLaunchDescriptor other = (ProjectLaunchDescriptor) obj; + if (project == null) { + if (other.project != null) + return false; + } else if (!project.equals(other.project)) + return false; + if (type == null) { + if (other.type != null) + return false; + } else if (!type.equals(other.type)) + return false; + return true; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectPerTargetLaunchConfigProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectPerTargetLaunchConfigProvider.java new file mode 100644 index 00000000000..47306ef5fb6 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/ProjectPerTargetLaunchConfigProvider.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * QNX Software Systems - Initial API and implementation + *******************************************************************************/ +package org.eclipse.launchbar.core; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +public abstract class ProjectPerTargetLaunchConfigProvider extends PerTargetLaunchConfigProvider { + + @Override + public boolean supports(ILaunchDescriptor descriptor, ILaunchTarget target) throws CoreException { + return (descriptor.getAdapter(IProject.class) != null); + } + + @Override + protected void populateLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target, + ILaunchConfigurationWorkingCopy workingCopy) throws CoreException { + super.populateLaunchConfiguration(descriptor, target, workingCopy); + + // Add our project to the mapped resources + IProject project = descriptor.getAdapter(IProject.class); + IResource[] mappedResources = workingCopy.getMappedResources(); + if (mappedResources == null || mappedResources.length == 0) { + workingCopy.setMappedResources(new IResource[] { project }); + } else { + IResource[] newResources = new IResource[mappedResources.length + 1]; + System.arraycopy(mappedResources, 0, newResources, 0, mappedResources.length); + newResources[mappedResources.length] = project; + workingCopy.setMappedResources(newResources); + } + } + + @Override + protected ILaunchDescriptor getLaunchDescriptor(ILaunchConfiguration configuration) throws CoreException { + IResource[] mappedResources = configuration.getMappedResources(); + if (mappedResources == null) { + return null; + } + + IProject project = null; + for (IResource resource : mappedResources) { + if (resource instanceof IProject) + project = (IProject) resource; + } + if (project == null) { + return null; + } + + ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + return manager.launchObjectAdded(project); + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Activator.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Activator.java new file mode 100644 index 00000000000..ba17d2770d3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Activator.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.core.runtime.Status; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.internal.target.LaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +public class Activator extends Plugin { + + public static final String PLUGIN_ID = "org.eclipse.launchbar.core"; //$NON-NLS-1$ + private static Activator plugin; + + private static LaunchTargetManager launchTargetManager; + private static LaunchBarManager launchBarManager; + + @Override + public void start(BundleContext bundleContext) throws Exception { + super.start(bundleContext); + plugin = this; + + launchTargetManager = new LaunchTargetManager(); + bundleContext.registerService(ILaunchTargetManager.class, launchTargetManager, null); + + launchBarManager = new LaunchBarManager(); + bundleContext.registerService(ILaunchBarManager.class, launchBarManager, null); + } + + @Override + public void stop(BundleContext bundleContext) throws Exception { + super.stop(bundleContext); + plugin = null; + launchTargetManager = null; + launchBarManager = null; + } + + public static Activator getDefault() { + return plugin; + } + + public static LaunchBarManager getLaunchBarManager() { + return launchBarManager; + } + + public static LaunchTargetManager getLaunchTargetManager() { + return launchTargetManager; + } + + /** + * Return the OSGi service with the given service interface. + * + * @param service + * service interface + * @return the specified service or null if it's not registered + */ + public static T getService(Class service) { + BundleContext context = plugin.getBundle().getBundleContext(); + ServiceReference ref = context.getServiceReference(service); + return ref != null ? context.getService(ref) : null; + } + + public static void throwCoreException(Exception e) throws CoreException { + throw new CoreException(new Status(IStatus.ERROR, PLUGIN_ID, e.getLocalizedMessage(), e)); + } + + public static void log(IStatus status) { + if (plugin != null) + plugin.getLog().log(status); + else + System.err.println(status.getMessage()); + } + + public static void log(Throwable exception) { + if (exception instanceof CoreException) { + log(((CoreException) exception).getStatus()); + } else { + log(new Status(IStatus.ERROR, PLUGIN_ID, exception.getLocalizedMessage(), exception)); + } + } + + private static final String DEBUG_ONE = PLUGIN_ID + "/debug/launchbar"; //$NON-NLS-1$ + + public static void trace(String str) { + if (plugin == null || (plugin.isDebugging() && "true".equalsIgnoreCase(Platform.getDebugOption(DEBUG_ONE)))) //$NON-NLS-1$ + System.out.println("launchbar: " + str); //$NON-NLS-1$ + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ExecutableExtension.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ExecutableExtension.java new file mode 100644 index 00000000000..c509b2d91dc --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ExecutableExtension.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; + +/** + * A wrapper class that delays instantiation of classes until they're needed + * to prevent early plug-in loading. + * + * @param the type of the object created + */ +public class ExecutableExtension { + + private IConfigurationElement element; + private String propertyName; + private T object; + + public ExecutableExtension(IConfigurationElement element, String propertyName) { + this.element = element; + this.propertyName = propertyName; + } + + // For testing, pre-populate the object + public ExecutableExtension(T object) { + this.object = object; + } + + /** + * Get the object instantiating it if necessary. + * @return object + * @throws CoreException + */ + @SuppressWarnings("unchecked") + public T get() throws CoreException { + if (element != null) { + object = (T) element.createExecutableExtension(propertyName); + element = null; + propertyName = null; + } + return object; + } + + /** + * Creates a new object. Can't be done if you've done a get already. + * @return a new object from the extension or null if get was called earlier + * @throws CoreException + */ + @SuppressWarnings("unchecked") + public T create() throws CoreException { + if (element != null) { + return (T) element.createExecutableExtension(propertyName); + } + return null; + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java new file mode 100644 index 00000000000..e118cd89417 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchBarManager.java @@ -0,0 +1,1031 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchListener; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.launchbar.core.DefaultLaunchDescriptor; +import org.eclipse.launchbar.core.ILaunchBarListener; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchConfigurationProvider; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.ILaunchDescriptorType; +import org.eclipse.launchbar.core.ILaunchObjectProvider; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetListener; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.launch.ITargetedLaunch; +import org.osgi.service.prefs.BackingStoreException; +import org.osgi.service.prefs.Preferences; + +/** + * The brains of the launch bar. + */ +public class LaunchBarManager implements ILaunchBarManager, ILaunchTargetListener { + private final List listeners = new LinkedList<>(); + // The launch object providers + private final List objectProviders = new ArrayList<>(); + // The descriptor types + private final Map descriptorTypes = new HashMap<>(); + // Descriptor types ordered from highest priority to lowest + private List orderedDescriptorTypes; + // the extended info for loaded descriptor types + private final Map descriptorTypeInfo = new HashMap<>(); + private final Map> configProviders = new HashMap<>(); + // Descriptors in MRU order, key is desc type id and desc name. + private final Map, ILaunchDescriptor> descriptors = new LinkedHashMap<>(); + // Map of launch objects to launch descriptors + private final Map objectDescriptorMap = new HashMap<>(); + private ILaunchTargetManager launchTargetManager; + private ILaunchDescriptor activeLaunchDesc; + private ILaunchMode activeLaunchMode; + private ILaunchTarget activeLaunchTarget; + // private static final String PREF_ACTIVE_CONFIG_DESC = "activeConfigDesc"; + private static final String PREF_ACTIVE_LAUNCH_MODE = "activeLaunchMode"; //$NON-NLS-1$ + private static final String PREF_ACTIVE_LAUNCH_TARGET = "activeLaunchTarget"; //$NON-NLS-1$ + private static final String PREF_CONFIG_DESC_ORDER = "configDescList"; //$NON-NLS-1$ + private static final String PREF_TRACK_LAUNCHES = "trackLaunches"; //$NON-NLS-1$ + boolean initialized = false; + + public LaunchBarManager() { + this(true); + } + + // called from unit tests to ensure everything is inited + LaunchBarManager(boolean doInit) { + launchTargetManager = getLaunchTargetManager(); + launchTargetManager.addListener(this); + if (doInit) { + new Job(Messages.LaunchBarManager_0) { + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + init(); + return Status.OK_STATUS; + } catch (CoreException e) { + return e.getStatus(); + } + } + }.schedule(); + } + } + + // To allow override by tests + IExtensionPoint getExtensionPoint() throws CoreException { + return Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarContributions"); //$NON-NLS-1$ + } + + // To allow override by tests + ILaunchManager getLaunchManager() { + return DebugPlugin.getDefault().getLaunchManager(); + } + + ILaunchTargetManager getLaunchTargetManager() { + return Activator.getService(ILaunchTargetManager.class); + } + + // When testing, call this after setting up the mocks. + void init() throws CoreException { + try { + // Fetch the desc order before the init messes it up + IEclipsePreferences store = getPreferenceStore(); + String configDescIds = store.get(PREF_CONFIG_DESC_ORDER, ""); //$NON-NLS-1$ + // Load up the types + loadExtensions(); + // Hook up the existing launch configurations and listen + ILaunchManager launchManager = getLaunchManager(); + for (ILaunchConfiguration configuration : launchManager.getLaunchConfigurations()) { + launchConfigurationAdded(configuration); + } + launchManager.addLaunchConfigurationListener(this); + // Reorder the descriptors based on the preference + if (!configDescIds.isEmpty()) { + String[] split = configDescIds.split(","); //$NON-NLS-1$ + ILaunchDescriptor last = null; + for (String id : split) { + Pair key = toId(id); + ILaunchDescriptor desc = descriptors.get(key); + if (desc != null) { + descriptors.remove(key); + descriptors.put(key, desc); + last = desc; + } + } + // Set the active desc, with MRU, it should be the last one + if (last != null) { + setActiveLaunchDescriptor(last); + } + } + launchManager.addLaunchListener(new ILaunchListener() { + @Override + public void launchRemoved(ILaunch launch) { + // ignore + } + + @Override + public void launchAdded(ILaunch launch) { + if (!getPreferenceStore().getBoolean(PREF_TRACK_LAUNCHES, true)) + return; + ILaunchConfiguration lc = launch.getLaunchConfiguration(); + String mode = launch.getLaunchMode(); + ILaunchTarget target = null; + if (launch instanceof ITargetedLaunch) { + target = ((ITargetedLaunch) launch).getLaunchTarget(); + } + try { + setActive(lc, mode, target); + } catch (CoreException e) { + Activator.log(e); + } + } + + @Override + public void launchChanged(ILaunch launch) { + ILaunchConfiguration lc = launch.getLaunchConfiguration(); + ILaunchTarget target = null; + if (launch instanceof ITargetedLaunch) { + target = ((ITargetedLaunch) launch).getLaunchTarget(); + } + if (target == null) + return; + if (launchDescriptorMatches(activeLaunchDesc, lc, target)) { + // active launch delegate may have changed target + try { + setActiveLaunchTarget(target); + } catch (CoreException e) { + Activator.log(e); + } + } + } + }); + } finally { + initialized = true; + } + fireActiveLaunchDescriptorChanged(); + fireActiveLaunchTargetChanged(); + fireActiveLaunchModeChanged(); + fireLaunchTargetsChanged(); + } + + private void loadExtensions() throws CoreException { + IExtensionPoint point = getExtensionPoint(); + IExtension[] extensions = point.getExtensions(); + // Load up the types + for (IExtension extension : extensions) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + try { + String elementName = element.getName(); + if (elementName.equals("descriptorType")) { //$NON-NLS-1$ + LaunchDescriptorTypeInfo typeInfo = new LaunchDescriptorTypeInfo(element); + descriptorTypes.put(typeInfo.getId(), typeInfo); + if (configProviders.get(typeInfo.getId()) == null) { + // Make sure we initialize the list + configProviders.put(typeInfo.getId(), new ArrayList()); + } + } else if (elementName.equals("configProvider")) { //$NON-NLS-1$ + LaunchConfigProviderInfo info = new LaunchConfigProviderInfo(element); + List providers = configProviders.get(info.getDescriptorTypeId()); + if (providers == null) { + providers = new ArrayList<>(); + configProviders.put(info.getDescriptorTypeId(), providers); + } + providers.add(info); + } + } catch (Exception e) { + Activator.log(e); + } + } + } + // Sort things + orderedDescriptorTypes = new ArrayList<>(descriptorTypes.values()); + Collections.sort(orderedDescriptorTypes, (o1, o2) -> { + int p1 = o1.getPriority(); + int p2 = o2.getPriority(); + if (p1 < p2) { + return 1; + } else if (p1 > p2) { + return -1; + } else { + return 0; + } + }); + for (List providers : configProviders.values()) { + Collections.sort(providers, (o1, o2) -> { + int p1 = o1.getPriority(); + int p2 = o2.getPriority(); + if (p1 < p2) { + return 1; + } else if (p1 > p2) { + return -1; + } else { + return 0; + } + }); + } + // Now that all the types are loaded, the object providers which now + // populate the descriptors + for (IExtension extension : extensions) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + try { + String elementName = element.getName(); + if (elementName.equals("objectProvider")) { //$NON-NLS-1$ + ILaunchObjectProvider objectProvider = (ILaunchObjectProvider) element + .createExecutableExtension("class"); //$NON-NLS-1$ + objectProviders.add(objectProvider); + objectProvider.init(this); + } + } catch (Exception e) { + // exceptions during extension loading, log and move on + Activator.log(e); + } + } + } + } + + private String toString(Pair key) { + return key.getFirst() + ":" + key.getSecond(); //$NON-NLS-1$ + } + + private Pair toId(String key) { + int i = key.indexOf(':'); + if (i < 0) { + return null; + } + return new Pair<>(key.substring(0, i), key.substring(i + 1)); + } + + @Override + public String getDescriptorTypeId(ILaunchDescriptorType type) { + return descriptorTypeInfo.get(type).getId(); + } + + private Pair getDescriptorId(ILaunchDescriptor descriptor) { + return new Pair<>(getDescriptorTypeId(descriptor.getType()), descriptor.getName()); + } + + private Pair getTargetId(ILaunchTarget target) { + return new Pair<>(target.getTypeId(), target.getId()); + } + + private void addDescriptor(Object launchObject, ILaunchDescriptor descriptor) throws CoreException { + descriptors.put(getDescriptorId(descriptor), descriptor); + objectDescriptorMap.put(launchObject, descriptor); + setActiveLaunchDescriptor(descriptor); + } + + @Override + public ILaunchConfigurationType getLaunchConfigurationType(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + if (descriptor == null) + return null; + + if (descriptor instanceof DefaultLaunchDescriptor) { + // With the default descriptor, we already have the config, just return the type + // Doesn't matter what the target is, that's dealt with at launch time + ILaunchConfiguration config = descriptor.getAdapter(ILaunchConfiguration.class); + return config.getType(); + } + + for (LaunchConfigProviderInfo providerInfo : configProviders.get(getDescriptorTypeId(descriptor.getType()))) { + if (providerInfo.enabled(descriptor) && providerInfo.enabled(target)) { + ILaunchConfigurationProvider provider = providerInfo.getProvider(); + if (provider != null && provider.supports(descriptor, target)) { + ILaunchConfigurationType type = provider.getLaunchConfigurationType(descriptor, target); + if (type != null) { + return type; + } + } + } + } + + // not found + return null; + } + + @Override + public ILaunchDescriptor launchObjectAdded(Object launchObject) { + Activator.trace("launch object added " + launchObject); //$NON-NLS-1$ + ILaunchDescriptor desc = objectDescriptorMap.get(launchObject); + if (desc != null) { + return desc; + } + for (LaunchDescriptorTypeInfo descriptorInfo : orderedDescriptorTypes) { + try { + if (descriptorInfo.enabled(launchObject)) { + ILaunchDescriptorType type = descriptorInfo.getType(); + // For newly loaded types, this is the first time we see + // them + // Add it to the info map. + descriptorTypeInfo.put(type, descriptorInfo); + desc = type.getDescriptor(launchObject); + if (desc != null) { + addDescriptor(launchObject, desc); + return desc; + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + return null; + } + + @Override + public void launchObjectRemoved(Object launchObject) throws CoreException { + Activator.trace("launch object removed " + launchObject); //$NON-NLS-1$ + ILaunchDescriptor descriptor = objectDescriptorMap.remove(launchObject); + if (descriptor != null) { + descriptors.remove(getDescriptorId(descriptor)); + if (descriptor.equals(activeLaunchDesc)) { + setActiveLaunchDescriptor(getLastUsedDescriptor()); + } + for (LaunchConfigProviderInfo providerInfo : configProviders + .get(getDescriptorTypeId(descriptor.getType()))) { + if (providerInfo.enabled(descriptor)) { + providerInfo.getProvider().launchDescriptorRemoved(descriptor); + } + } + } + } + + @Override + public void launchObjectChanged(Object launchObject) throws CoreException { + // TODO deal with object renames here, somehow + ILaunchDescriptor origDesc = objectDescriptorMap.get(launchObject); + if (origDesc == null) { + // See if anyone wants it now + launchObjectAdded(launchObject); + return; + } + // check if descriptor still wants it + ILaunchDescriptorType origDescType = origDesc.getType(); + try { + ILaunchDescriptor newDesc = origDescType.getDescriptor(launchObject); + if (newDesc == null) { + // nope, give it back to the pool + objectDescriptorMap.remove(launchObject); + launchObjectAdded(launchObject); + } else if (!newDesc.equals(origDesc)) { + // record the new descriptor + objectDescriptorMap.put(launchObject, newDesc); + } + } catch (Throwable e) { + Activator.log(e); + } + } + + private ILaunchDescriptor getLastUsedDescriptor() { + if (descriptors.size() == 0) + return null; + ILaunchDescriptor[] descs = descriptors.values().toArray(new ILaunchDescriptor[descriptors.size()]); + return descs[descs.length - 1]; + } + + @Override + public ILaunchDescriptor[] getLaunchDescriptors() { + // return descriptor in usage order (most used first). UI can sort them + // later as it wishes + ArrayList values = new ArrayList<>(descriptors.values()); + Collections.reverse(values); + return values.toArray(new ILaunchDescriptor[values.size()]); + } + + @Override + public ILaunchDescriptor getActiveLaunchDescriptor() { + return activeLaunchDesc; + } + + private void setActive(ILaunchConfiguration config, String mode, ILaunchTarget target) throws CoreException { + ILaunchDescriptor descriptor = getLaunchDescriptor(config, target); + if (descriptor == null) + return; // not found + // we do not call setActiveLaunchTarget because it will cause + // mode/target switch and cause flickering + boolean changeDesc = activeLaunchDesc != descriptor; + boolean changeTarget = target != null && activeLaunchTarget != target; + if (changeDesc) { + doSetActiveLaunchDescriptor(descriptor); + // store in persistent storage + storeActiveDescriptor(activeLaunchDesc); + } + if (changeTarget) { + activeLaunchTarget = target; + storeLaunchTarget(activeLaunchDesc, target); + } + ILaunchMode[] supportedModes = getLaunchModes(); + for (ILaunchMode launchMode : supportedModes) { + if (launchMode.getIdentifier().equals(mode)) { + setActiveLaunchMode(launchMode); + break; + } + } + // send delayed notification about descriptor change + if (changeDesc) { + fireActiveLaunchDescriptorChanged(); + } + if (changeTarget) { + fireActiveLaunchTargetChanged(); // notify target listeners + } + } + + @Override + public void setActiveLaunchDescriptor(ILaunchDescriptor descriptor) throws CoreException { + Activator.trace("set active descriptor " + descriptor); //$NON-NLS-1$ + if (activeLaunchDesc == descriptor) { + // Sync since targets could be changed since last time (and modes + // theoretically too) + syncActiveTarget(); + syncActiveMode(); + Activator.trace("resync for " + descriptor); //$NON-NLS-1$ + return; + } + if (descriptor != null && !descriptors.containsValue(descriptor)) { + throw new IllegalStateException(Messages.LaunchBarManager_1); + } + if (descriptor == null) { + // do not set to null unless no descriptors + descriptor = getLastUsedDescriptor(); + } + doSetActiveLaunchDescriptor(descriptor); + // store in persistent storage + storeActiveDescriptor(activeLaunchDesc); + // Send notifications + fireActiveLaunchDescriptorChanged(); + // Set active target + syncActiveTarget(); + // Set active mode + syncActiveMode(); + } + + private void doSetActiveLaunchDescriptor(ILaunchDescriptor descriptor) { + activeLaunchDesc = descriptor; + if (descriptor != null) { + // keeps most used descriptor last + Pair id = getDescriptorId(descriptor); + descriptors.remove(id); + descriptors.put(id, descriptor); + } + } + + private void storeActiveDescriptor(ILaunchDescriptor descriptor) { + Activator.trace("new active config is stored " + descriptor); //$NON-NLS-1$ + // Store the desc order, active one is the last one + StringBuffer buff = new StringBuffer(); + // TODO: this can be very long string + for (Pair key : descriptors.keySet()) { + if (buff.length() > 0) { + buff.append(','); + } + buff.append(toString(key)); + } + setPreference(getPreferenceStore(), PREF_CONFIG_DESC_ORDER, buff.toString()); + } + + private void syncActiveTarget() throws CoreException { + if (activeLaunchDesc == null) { + setActiveLaunchTarget(null); + return; + } + // last stored target from persistent storage + String activeTargetId = getPerDescriptorStore().get(PREF_ACTIVE_LAUNCH_TARGET, null); + if (activeTargetId != null) { + Pair id = toId(activeTargetId); + ILaunchTarget storedTarget = launchTargetManager.getLaunchTarget(id.getFirst(), id.getSecond()); + if (storedTarget != null && supportsTarget(activeLaunchDesc, storedTarget)) { + setActiveLaunchTarget(storedTarget); + return; + } + } else { + // current active target, check if it is supported + if (activeLaunchTarget != null && activeLaunchTarget != ILaunchTarget.NULL_TARGET + && supportsTarget(activeLaunchDesc, activeLaunchTarget)) { + setActiveLaunchTarget(activeLaunchTarget); + return; + } + } + // default target for descriptor + setActiveLaunchTarget(getDefaultLaunchTarget(activeLaunchDesc)); + } + + private void syncActiveMode() throws CoreException { + if (activeLaunchDesc == null) { + setActiveLaunchMode(null); + return; + } + ILaunchMode foundMode = null; + // last desc mode id + String storedModeId = getPerDescriptorStore().get(PREF_ACTIVE_LAUNCH_MODE, null); + String lastActiveModeId = activeLaunchMode == null ? null : activeLaunchMode.getIdentifier(); + // this is based on active desc and target which are already set + ILaunchMode[] supportedModes = getLaunchModes(); + if (supportedModes.length > 0) { // mna, what if no modes are supported? + String modeNames[] = new String[] { storedModeId, lastActiveModeId, "run", //$NON-NLS-1$ + "debug", //$NON-NLS-1$ + supportedModes[0].getIdentifier() }; + for (int i = 0; i < modeNames.length; i++) { + foundMode = getLaunchManager().getLaunchMode(modeNames[i]); + if (supportsMode(foundMode)) + break; + } + } + setActiveLaunchMode(foundMode); + } + + private boolean supportsMode(ILaunchMode mode) throws CoreException { + // check that active descriptor supports the given mode + if (mode == null) + return false; + ILaunchMode[] supportedModes = getLaunchModes(); + for (int j = 0; j < supportedModes.length; j++) { + ILaunchMode lm = supportedModes[j]; + if (lm.equals(mode)) + return true; + } + return false; + } + + private void setPreference(Preferences store, String prefId, String value) { + if (value != null) { + store.put(prefId, value); + } else { + store.remove(prefId); + } + try { + store.flush(); + } catch (BackingStoreException e) { + Activator.log(e); + } + } + + private Preferences getPerDescriptorStore() { + return getPerDescriptorStore(activeLaunchDesc); + } + + private Preferences getPerDescriptorStore(ILaunchDescriptor launchDesc) { + if (launchDesc == null) + return getPreferenceStore(); + String string; + try { + string = toString(getDescriptorId(launchDesc)); + } catch (Exception e) { + Activator.log(e); + string = launchDesc.getName(); + } + return getPreferenceStore().node(string); + } + + // package private so tests can access it + IEclipsePreferences getPreferenceStore() { + return InstanceScope.INSTANCE.getNode(Activator.PLUGIN_ID); + } + + private interface FireAction { + void run(ILaunchBarListener listener); + } + + private void fireEvent(FireAction action) { + Collection l; + synchronized (listeners) { + l = new ArrayList<>(listeners); + } + + for (ILaunchBarListener listener : l) { + action.run(listener); + } + } + + private void fireActiveLaunchDescriptorChanged() { + if (!initialized) + return; + fireEvent(listener -> { + try { + listener.activeLaunchDescriptorChanged(activeLaunchDesc); + } catch (Exception e) { + Activator.log(e); + } + }); + } + + @Override + public ILaunchMode[] getLaunchModes() throws CoreException { + ILaunchConfigurationType configType = getLaunchConfigurationType(activeLaunchDesc, activeLaunchTarget); + if (configType == null) + return new ILaunchMode[0]; + List modeList = new ArrayList<>(); + ILaunchMode[] modes = getLaunchManager().getLaunchModes(); + for (ILaunchMode mode : modes) { + if (configType.supportsMode(mode.getIdentifier())) { + modeList.add(mode); + } + } + return modeList.toArray(new ILaunchMode[modeList.size()]); + } + + @Override + public ILaunchMode getActiveLaunchMode() { + return activeLaunchMode; + } + + /** + * Sets the preferred mode for the given descriptor + * + * @param desc + * @param mode + * @throws CoreException + */ + public void setLaunchMode(ILaunchDescriptor desc, ILaunchMode mode) throws CoreException { + if (desc == activeLaunchDesc) { + setActiveLaunchMode(mode); + } else { + storeLaunchMode(desc, mode); + } + } + + @Override + public void setActiveLaunchMode(ILaunchMode mode) throws CoreException { + if (activeLaunchMode == mode) { + // we have to modify listeners here because same mode does not mean + // same launch group. ModeSelector has to update. + fireActiveLaunchModeChanged(); // notify listeners + return; + } + if (activeLaunchDesc != null && mode != null && !supportsMode(mode)) + throw new IllegalStateException(Messages.LaunchBarManager_2); + // change mode + activeLaunchMode = mode; + storeLaunchMode(activeLaunchDesc, mode); + fireActiveLaunchModeChanged(); // notify listeners + } + + private void fireActiveLaunchModeChanged() { + if (!initialized) + return; + fireEvent(listener -> { + try { + listener.activeLaunchModeChanged(activeLaunchMode); + } catch (Exception e) { + Activator.log(e); + } + }); + } + + private void storeLaunchMode(ILaunchDescriptor desc, ILaunchMode mode) { + if (mode != null) { + // per desc store, desc can null if will be stored globally + setPreference(getPerDescriptorStore(desc), PREF_ACTIVE_LAUNCH_MODE, mode.getIdentifier()); + } + } + + @Override + public ILaunchTarget[] getLaunchTargets(ILaunchDescriptor descriptor) { + if (descriptor == null) + return launchTargetManager.getLaunchTargets(); + List targets = new ArrayList<>(); + for (ILaunchTarget target : launchTargetManager.getLaunchTargets()) { + if (supportsTarget(descriptor, target)) { + targets.add(target); + } + } + if (supportsNullTarget(descriptor)) { + targets.add(ILaunchTarget.NULL_TARGET); + } + return targets.toArray(new ILaunchTarget[targets.size()]); + } + + boolean supportsTarget(ILaunchDescriptor descriptor, ILaunchTarget target) { + String descriptorTypeId = getDescriptorTypeId(descriptor.getType()); + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descriptorTypeId)) { + try { + if (providerInfo.enabled(descriptor) && providerInfo.enabled(target)) { + if (providerInfo.getProvider().supports(descriptor, target)) { + return true; + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + return false; + } + + boolean supportsNullTarget(ILaunchDescriptor descriptor) { + String descriptorTypeId = getDescriptorTypeId(descriptor.getType()); + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descriptorTypeId)) { + if (providerInfo.enabled(descriptor) && providerInfo.supportsNullTarget()) { + return true; + } + } + return false; + } + + @Override + public ILaunchTarget getActiveLaunchTarget() { + return activeLaunchTarget; + } + + /** + * Sets preferred target for launch descriptor + * + * @param desc + * @param target + * @throws CoreException + */ + public void setLaunchTarget(ILaunchDescriptor desc, ILaunchTarget target) throws CoreException { + if (desc == activeLaunchDesc) { + setActiveLaunchTarget(target); + } else { + storeLaunchTarget(desc, target); + } + } + + @Override + public void setActiveLaunchTarget(ILaunchTarget target) throws CoreException { + if (target == null) + target = ILaunchTarget.NULL_TARGET; + if (activeLaunchTarget == target) { + return; + } + activeLaunchTarget = target; + storeLaunchTarget(activeLaunchDesc, target); + syncActiveMode(); + fireActiveLaunchTargetChanged(); // notify listeners + } + + private void storeLaunchTarget(ILaunchDescriptor desc, ILaunchTarget target) { + if (target == null) { + // Don't store if it's null. Not sure we're null any more anyway. + return; + } + // per desc store, desc can be null means it store globally + setPreference(getPerDescriptorStore(desc), PREF_ACTIVE_LAUNCH_TARGET, toString(getTargetId(target))); + } + + private void fireActiveLaunchTargetChanged() { + if (!initialized) + return; + fireEvent(listener -> { + try { + listener.activeLaunchTargetChanged(activeLaunchTarget); + } catch (Exception e) { + Activator.log(e); + } + }); + } + + private ILaunchTarget getDefaultLaunchTarget(ILaunchDescriptor descriptor) { + ILaunchTarget[] targets = getLaunchTargets(descriptor); + // chances are that better target is most recently added, rather then + // the oldest + return targets.length == 0 ? ILaunchTarget.NULL_TARGET : targets[targets.length - 1]; + } + + @Override + public ILaunchConfiguration getActiveLaunchConfiguration() throws CoreException { + ILaunchConfiguration configuration = getLaunchConfiguration(activeLaunchDesc, activeLaunchTarget); + // This is the only concrete time we have the mapping from launch + // configuration to launch target. Record it in the target manager for + // the launch delegates to use. + if (configuration != null) { + launchTargetManager.setDefaultLaunchTarget(configuration, activeLaunchTarget); + } + return configuration; + } + + @Override + public ILaunchConfiguration getLaunchConfiguration(ILaunchDescriptor descriptor, ILaunchTarget target) + throws CoreException { + if (descriptor == null) { + return null; + } + + if (descriptor instanceof DefaultLaunchDescriptor) { + return descriptor.getAdapter(ILaunchConfiguration.class); + } + + String descTypeId = getDescriptorTypeId(descriptor.getType()); + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descTypeId)) { + try { + if (providerInfo.enabled(descriptor) && providerInfo.enabled(target)) { + ILaunchConfigurationProvider provider = providerInfo.getProvider(); + // between multiple provider who support this descriptor we + // need to find one that supports this target + if (provider.supports(descriptor, target)) { + ILaunchConfiguration config = provider.getLaunchConfiguration(descriptor, target); + if (config != null) { + return config; + } + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + return null; + } + + @Override + public void addListener(ILaunchBarListener listener) { + if (listener == null) + return; + synchronized (listeners) { + if (!listeners.contains(listener)) // cannot add duplicates + listeners.add(listener); + } + } + + @Override + public void removeListener(ILaunchBarListener listener) { + if (listener == null) + return; + synchronized (listener) { + listeners.remove(listener); + } + } + + @Override + public void launchConfigurationAdded(ILaunchConfiguration configuration) { + for (LaunchDescriptorTypeInfo descTypeInfo : orderedDescriptorTypes) { + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descTypeInfo.getId())) { + try { + if (providerInfo.enabled(configuration)) { + if (providerInfo.getProvider().launchConfigurationAdded(configuration)) { + return; + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + } + // No one clamed it, add it as a launch object + launchObjectAdded(configuration); + } + + @Override + public void launchConfigurationRemoved(ILaunchConfiguration configuration) { + try { + launchObjectRemoved(configuration); + } catch (Throwable e) { + Activator.log(e); + } + for (LaunchDescriptorTypeInfo descTypeInfo : orderedDescriptorTypes) { + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descTypeInfo.getId())) { + try { + if (providerInfo.enabled(configuration)) { + if (providerInfo.getProvider().launchConfigurationRemoved(configuration)) { + return; + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + } + } + + @Override + public void launchConfigurationChanged(ILaunchConfiguration configuration) { + // we have to ignore notifications from working copies, otherwise + // we will get thousand of events and we don't track working copies + // (add/remove events are not sent for WCs) + if (configuration.isWorkingCopy()) + return; + for (LaunchDescriptorTypeInfo descTypeInfo : orderedDescriptorTypes) { + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descTypeInfo.getId())) { + try { + if (providerInfo.enabled(configuration)) { + if (providerInfo.getProvider().launchConfigurationChanged(configuration)) { + return; + } + } + } catch (Throwable e) { + Activator.log(e); + } + } + } + } + + public void dispose() { + ILaunchManager launchManager = getLaunchManager(); + launchManager.removeLaunchConfigurationListener(this); + for (ILaunchObjectProvider o : objectProviders) { + try { + o.dispose(); + } catch (Exception e) { + Activator.log(e); + } + } + } + + private void fireLaunchTargetsChanged() { + if (!initialized) + return; + fireEvent(listener -> { + try { + listener.launchTargetsChanged(); + } catch (Exception e) { + Activator.log(e); + } + }); + } + + @Override + public void launchTargetAdded(ILaunchTarget target) { + if (!initialized) + return; + fireLaunchTargetsChanged(); + // if we added new target we probably want to use it + if (activeLaunchDesc != null && supportsTarget(activeLaunchDesc, target)) { + try { + setActiveLaunchTarget(target); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + @Override + public void launchTargetRemoved(ILaunchTarget target) { + if (!initialized) + return; + fireLaunchTargetsChanged(); + if (activeLaunchTarget == target) { + try { + setActiveLaunchTarget(getDefaultLaunchTarget(activeLaunchDesc)); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + private ILaunchDescriptor getLaunchDescriptor(ILaunchConfiguration configuration, ILaunchTarget target) { + // shortcut - check active first + if (launchDescriptorMatches(activeLaunchDesc, configuration, target)) { + return activeLaunchDesc; + } + for (ILaunchDescriptor desc : getLaunchDescriptors()) { // this should + // be in MRU, + // most used + // first + if (launchDescriptorMatches(desc, configuration, target)) { + return desc; + } + } + return null; + } + + private boolean launchDescriptorMatches(ILaunchDescriptor desc, ILaunchConfiguration configuration, + ILaunchTarget target) { + if (desc == null || configuration == null) + return false; + try { + String descriptorTypeId = getDescriptorTypeId(desc.getType()); + for (LaunchConfigProviderInfo providerInfo : configProviders.get(descriptorTypeId)) { + if (providerInfo.enabled(desc) && (target == null || providerInfo.enabled(target))) { + if (providerInfo.getProvider().launchDescriptorMatches(desc, configuration, target)) { + return true; + } + } + } + } catch (CoreException e) { + Activator.log(e); + } + return false; + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchConfigProviderInfo.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchConfigProviderInfo.java new file mode 100644 index 00000000000..f0172116fe6 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchConfigProviderInfo.java @@ -0,0 +1,116 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.core.expressions.EvaluationContext; +import org.eclipse.core.expressions.EvaluationResult; +import org.eclipse.core.expressions.Expression; +import org.eclipse.core.expressions.ExpressionConverter; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Status; +import org.eclipse.launchbar.core.ILaunchConfigurationProvider; + +public class LaunchConfigProviderInfo { + private final String descriptorTypeId; + private final int priority; + private final boolean supportsNullTarget; + private IConfigurationElement element; + private ILaunchConfigurationProvider provider; + private Expression expression; + + public LaunchConfigProviderInfo(IConfigurationElement element) { + this.descriptorTypeId = element.getAttribute("descriptorType"); //$NON-NLS-1$ + + String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$ + int priorityNum; + try { + priorityNum = Integer.parseInt(priorityStr); + } catch (NumberFormatException e) { + priorityNum = 0; + } + priority = priorityNum; + + String nullTargetString = element.getAttribute("supportsNullTarget"); //$NON-NLS-1$ + if (nullTargetString != null) { + supportsNullTarget = Boolean.parseBoolean(nullTargetString); + } else { + supportsNullTarget = false; + } + + this.element = element; + + IConfigurationElement[] enabledExpressions = element.getChildren("enablement");//$NON-NLS-1$ + if (enabledExpressions == null || enabledExpressions.length == 0) { + Activator.log(new Status(Status.WARNING, Activator.PLUGIN_ID, + "Enablement expression is missing for config provider for " + descriptorTypeId)); //$NON-NLS-1$ + } else if (enabledExpressions.length > 1) { + Activator.log(new Status(Status.WARNING, Activator.PLUGIN_ID, + "Multiple enablement expressions are detected for config provider for "//$NON-NLS-1$ + + descriptorTypeId)); + } else { + try { + expression = ExpressionConverter.getDefault().perform(enabledExpressions[0]); + } catch (CoreException e) { + Activator.log(e); + } + if (expression == null) { + Activator.log(new Status(Status.ERROR, Activator.PLUGIN_ID, + "Cannot parse enablement expression defined in config provider for " + descriptorTypeId)); //$NON-NLS-1$ + } + } + + } + + public String getDescriptorTypeId() { + return descriptorTypeId; + } + + public int getPriority() { + return priority; + } + + public boolean supportsNullTarget() { + return supportsNullTarget; + } + + public ILaunchConfigurationProvider getProvider() { + if (provider == null) { + try { + provider = (ILaunchConfigurationProvider) element.createExecutableExtension("class"); //$NON-NLS-1$ + element = null; + } catch (CoreException e) { + Activator.log(e); + } + } + return provider; + } + + public boolean enabled(Object element) { + if (expression == null) { + return true; + } + if (element == null) { + return true; + } + try { + EvaluationResult result = expression.evaluate(new EvaluationContext(null, element)); + return (result == EvaluationResult.TRUE); + } catch (CoreException e) { + Activator.log(e); + return false; + } + } + +} \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchDescriptorTypeInfo.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchDescriptorTypeInfo.java new file mode 100644 index 00000000000..aea72201687 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/LaunchDescriptorTypeInfo.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.core.expressions.EvaluationContext; +import org.eclipse.core.expressions.EvaluationResult; +import org.eclipse.core.expressions.Expression; +import org.eclipse.core.expressions.ExpressionConverter; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.Status; +import org.eclipse.launchbar.core.ILaunchDescriptorType; + +public class LaunchDescriptorTypeInfo { + private final String id; + private int priority; + private IConfigurationElement element; + private ILaunchDescriptorType type; + private Expression expression; + + public LaunchDescriptorTypeInfo(IConfigurationElement element) { + this.id = element.getAttribute("id"); //$NON-NLS-1$ + String priorityStr = element.getAttribute("priority"); //$NON-NLS-1$ + this.priority = 1; + if (priorityStr != null) { + try { + priority = Integer.parseInt(priorityStr); + } catch (NumberFormatException e) { + // Log it but keep going with the default + Activator.log(e); + } + } + + this.element = element; + + IConfigurationElement[] enabledExpressions = element.getChildren("enablement");//$NON-NLS-1$ + if (enabledExpressions == null || enabledExpressions.length == 0) { + Activator.log(new Status(Status.WARNING, Activator.PLUGIN_ID, + "Enablement expression is missing for descriptor type " + id));//$NON-NLS-1$ + } else if (enabledExpressions.length > 1) { + Activator.log(new Status(Status.WARNING, Activator.PLUGIN_ID, + "Multiple enablement expressions are detected for descriptor type "//$NON-NLS-1$ + + id)); + } else { + try { + expression = ExpressionConverter.getDefault().perform(enabledExpressions[0]); + } catch (CoreException e) { + Activator.log(e); + } + if (expression == null) { + Activator.log(new Status(Status.ERROR, Activator.PLUGIN_ID, + "Cannot parse enablement expression defined in descriptor type " + id)); //$NON-NLS-1$ + } + } + } + + // Used for testing + LaunchDescriptorTypeInfo(String id, int priority, ILaunchDescriptorType type) { + this.id = id; + this.priority = priority; + this.type = type; + } + + public String getId() { + return id; + } + + public int getPriority() { + return priority; + } + + public ILaunchDescriptorType getType() throws CoreException { + if (type == null) { + type = (ILaunchDescriptorType) element.createExecutableExtension("class"); //$NON-NLS-1$ + element = null; + } + return type; + } + + public boolean enabled(Object launchObject) throws CoreException { + if (expression == null) + return true; + EvaluationContext context = new EvaluationContext(null, launchObject); + context.setAllowPluginActivation(true); + EvaluationResult result = expression.evaluate(context); + return (result == EvaluationResult.TRUE); + } +} \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Messages.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Messages.java new file mode 100644 index 00000000000..3e0163cb8f4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Messages.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.launchbar.core.internal.messages"; //$NON-NLS-1$ + public static String ILaunchTarget_notSupported; + public static String LaunchBarManager_0; + public static String LaunchBarManager_1; + public static String LaunchBarManager_2; + public static String LocalTarget_name; + public static String OK; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Pair.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Pair.java new file mode 100644 index 00000000000..35a27314605 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/Pair.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +/** + * Yet another implementation for Pair. You'd figure Java would have this out of the box. + * Used in the launch bar mainly for modeling descriptor and target id's which includ both + * type id and the object name. + * + * @param first element + * @param second element + */ +public class Pair { + + private final S first; + private final T second; + + public Pair(S first, T second) { + this.first = first; + this.second = second; + } + + public S getFirst() { + return first; + } + + public T getSecond() { + return second; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((first == null) ? 0 : first.hashCode()); + result = prime * result + ((second == null) ? 0 : second.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + @SuppressWarnings("unchecked") + Pair other = (Pair) obj; + if (first == null) { + if (other.first != null) + return false; + } else if (!first.equals(other.first)) + return false; + if (second == null) { + if (other.second != null) + return false; + } else if (!second.equals(other.second)) + return false; + return true; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ProjectLaunchObjectProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ProjectLaunchObjectProvider.java new file mode 100644 index 00000000000..12981d68d1e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/ProjectLaunchObjectProvider.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer - Initial API and implementation + * Alena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.core.internal; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchObjectProvider; + +/** + * Injects IProject objects from platform resources into the launch bar model + * for potential project descriptors. + */ +public class ProjectLaunchObjectProvider implements ILaunchObjectProvider, IResourceChangeListener { + private ILaunchBarManager manager; + + @Override + public void init(ILaunchBarManager manager) throws CoreException { + this.manager = manager; + for (IProject project : ResourcesPlugin.getWorkspace().getRoot().getProjects()) { + if (project.isOpen()) { + manager.launchObjectAdded(project); + } + } + ResourcesPlugin.getWorkspace().addResourceChangeListener(this, IResourceChangeEvent.POST_CHANGE); + } + + @Override + public void dispose() { + ResourcesPlugin.getWorkspace().removeResourceChangeListener(this); + } + + @Override + public void resourceChanged(IResourceChangeEvent event) { + try { + event.getDelta().accept(delta -> { + IResource res = delta.getResource(); + if (res instanceof IProject) { + IProject project = (IProject) res; + int kind = delta.getKind(); + if ((kind & IResourceDelta.ADDED) != 0) { + manager.launchObjectAdded(project); + } else if ((kind & IResourceDelta.REMOVED) != 0) { + manager.launchObjectRemoved(project); + } else if ((kind & IResourceDelta.CHANGED) != 0) { + int flags = delta.getFlags(); + // Right now, only care about nature changes + if ((flags & IResourceDelta.DESCRIPTION) != 0) { + manager.launchObjectChanged(project); + } + } + return false; + } else if (res instanceof IFile || res instanceof IFolder) { + return false; + } + return true; + }); + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/messages.properties b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/messages.properties new file mode 100644 index 00000000000..52f961bd86f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/messages.properties @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2014 QNX Software Systems and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# Doug Schaefer +################################################################################ +ILaunchTarget_notSupported=getWorkingCopy is not supported for NULL_TARGET +LaunchBarManager_0=Launch Bar Initialization +LaunchBarManager_1=Active descriptor must be in the map of descriptors +LaunchBarManager_2=Mode is not supported by descriptor +LocalTarget_name=Local +OK=OK diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java new file mode 100644 index 00000000000..cfdece3f9bc --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTarget.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy; +import org.osgi.service.prefs.BackingStoreException; +import org.osgi.service.prefs.Preferences; + +public class LaunchTarget extends PlatformObject implements ILaunchTarget { + private final String typeId; + private final String id; + final Preferences attributes; + + /** + * This should only be used to create the null target. There are no attributes supported on the + * null target. + */ + public LaunchTarget(String typeId, String id) { + this.typeId = typeId; + this.id = id; + this.attributes = null; + } + + public LaunchTarget(String typeId, String id, Preferences attributes) { + if (typeId == null || id == null || attributes == null) + throw new NullPointerException(); + this.typeId = typeId; + this.id = id; + this.attributes = attributes; + } + + @Override + public String getId() { + return id; + } + + @Override + public String getTypeId() { + return typeId; + } + + @Override + public ILaunchTargetWorkingCopy getWorkingCopy() { + return new LaunchTargetWorkingCopy(this); + } + + @Override + public String getAttribute(String key, String defValue) { + if (attributes != null) { + return attributes.get(key, defValue); + } else { + return defValue; + } + } + + @Override + public Map getAttributes() { + Map attrs = new HashMap<>(); + if (attributes != null) { + try { + for (String key : attributes.keys()) { + String value = attributes.get(key, null); + if (value != null) { + attrs.put(key, value); + } + } + } catch (BackingStoreException e) { + Activator.log(e); + } + } + return attrs; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + id.hashCode(); + result = prime * result + typeId.hashCode(); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + LaunchTarget other = (LaunchTarget) obj; + if (!id.equals(other.id)) + return false; + if (!typeId.equals(other.typeId)) + return false; + return true; + } +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetManager.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetManager.java new file mode 100644 index 00000000000..474ff44dad1 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetManager.java @@ -0,0 +1,309 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetListener; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetManager2; +import org.eclipse.launchbar.core.target.ILaunchTargetProvider; +import org.eclipse.launchbar.core.target.TargetStatus; +import org.osgi.service.prefs.BackingStoreException; +import org.osgi.service.prefs.Preferences; + +public class LaunchTargetManager implements ILaunchTargetManager, ILaunchTargetManager2 { + + private Map> targets; + private Map typeElements; + private Map typeProviders = new LinkedHashMap<>(); + private List listeners = Collections.synchronizedList(new LinkedList<>()); + + private static final String DELIMETER1 = ","; //$NON-NLS-1$ + private static final String DELIMETER2 = ":"; //$NON-NLS-1$ + private static final String SLASH = "/"; //$NON-NLS-1$ + private static final String SLASH_REPLACER = ";"; //$NON-NLS-1$ + + private Preferences getTargetsPref() { + return InstanceScope.INSTANCE.getNode(Activator.getDefault().getBundle().getSymbolicName()) + .node(getClass().getSimpleName()); + } + + private synchronized void initTargets() { + if (targets == null) { + // load target type elements from registry + typeElements = new LinkedHashMap<>(); + IExtensionRegistry registry = Platform.getExtensionRegistry(); + IExtensionPoint point = registry + .getExtensionPoint(Activator.getDefault().getBundle().getSymbolicName() + ".launchTargetTypes"); //$NON-NLS-1$ + for (IExtension extension : point.getExtensions()) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + String id = element.getAttribute("id"); //$NON-NLS-1$ + if (id != null) { + typeElements.put(id, element); + } + } + } + + // load targets from preference store + targets = new LinkedHashMap<>(); + Preferences prefs = getTargetsPref(); + try { + for (String childName : prefs.childrenNames()) { + String[] segments = childName.split(DELIMETER1); + if (segments.length == 2) { + String typeId = segments[0]; + // Bug 536889 - we need to restore any slashes we changed when creating + // the target node so the name will appear correct to the end-user + String name = segments[1].replaceAll(SLASH_REPLACER, SLASH); + + Map type = targets.get(typeId); + if (type == null) { + type = new LinkedHashMap<>(); + targets.put(typeId, type); + } + + type.put(name, new LaunchTarget(typeId, name, prefs.node(childName))); + } + } + + // convert old type keys + if (prefs.keys().length > 0) { + for (String typeId : prefs.keys()) { + Map type = targets.get(typeId); + if (type == null) { + type = new LinkedHashMap<>(); + targets.put(typeId, type); + } + + for (String name : prefs.get(typeId, "").split(DELIMETER1)) { //$NON-NLS-1$ + if (!type.containsKey(name)) { + type.put(name, new LaunchTarget(typeId, name, prefs.node(typeId + DELIMETER1 + name))); + } + } + + // Use children going forward + prefs.remove(typeId); + } + + prefs.flush(); + } + } catch (BackingStoreException e) { + Activator.log(e); + } + + // Call the provider's init + // TODO check enablement so we don't call them if we don't need to + for (String typeId : typeElements.keySet()) { + ILaunchTargetProvider provider = getProvider(typeId); + if (provider != null) { + provider.init(this); + } + } + } + } + + private ILaunchTargetProvider getProvider(String typeId) { + initTargets(); + ILaunchTargetProvider provider = typeProviders.get(typeId); + if (provider == null) { + IConfigurationElement element = typeElements.get(typeId); + if (element != null) { + try { + provider = (ILaunchTargetProvider) element.createExecutableExtension("provider"); //$NON-NLS-1$ + } catch (CoreException e) { + Activator.log(e); + } + } + + if (provider == null) { + provider = new ILaunchTargetProvider() { + @Override + public void init(ILaunchTargetManager targetManager) { + } + + @Override + public TargetStatus getStatus(ILaunchTarget target) { + return TargetStatus.OK_STATUS; + } + }; + } + typeProviders.put(typeId, provider); + } + return provider; + } + + @Override + public ILaunchTarget[] getLaunchTargets() { + initTargets(); + List targetList = new ArrayList<>(); + for (Map type : targets.values()) { + targetList.addAll(type.values()); + } + return targetList.toArray(new ILaunchTarget[targetList.size()]); + } + + @Override + public ILaunchTarget[] getLaunchTargetsOfType(String typeId) { + initTargets(); + Map type = targets.get(typeId); + if (type != null) { + return type.values().toArray(new ILaunchTarget[type.size()]); + } + return new ILaunchTarget[0]; + } + + @Override + public ILaunchTarget getLaunchTarget(String typeId, String id) { + initTargets(); + Map type = targets.get(typeId); + if (type != null) { + return type.get(id); + } + return null; + } + + @Override + public TargetStatus getStatus(ILaunchTarget target) { + return getProvider(target.getTypeId()).getStatus(target); + } + + @Override + public ILaunchTarget addLaunchTargetNoNotify(String typeId, String id) { + initTargets(); + Map type = targets.get(typeId); + if (type == null) { + type = new LinkedHashMap<>(); + targets.put(typeId, type); + } + + try { + Preferences prefs = getTargetsPref(); + // Bug 536889 - replace any slashes in the id with a replacement character + // for the child node name but still leave the id intact for the launch target + String childName = typeId + DELIMETER1 + id.replaceAll(SLASH, SLASH_REPLACER); + Preferences child; + if (prefs.nodeExists(childName)) { + child = prefs.node(childName); + } else { + child = prefs.node(childName); + // set the id so we have at least one attribute to save + child.put("name", id); //$NON-NLS-1$ + } + ILaunchTarget target = new LaunchTarget(typeId, id, child); + type.put(id, target); + prefs.flush(); + return target; + } catch (BackingStoreException e) { + Activator.log(e); + return null; + } + } + + @Override + public ILaunchTarget addLaunchTarget(String typeId, String id) { + ILaunchTarget target = addLaunchTargetNoNotify(typeId, id); + if (target != null) { + synchronized (listeners) { + for (ILaunchTargetListener listener : listeners) { + listener.launchTargetAdded(target); + } + } + } + return target; + } + + @Override + public void removeLaunchTarget(ILaunchTarget target) { + initTargets(); + String typeId = target.getTypeId(); + Map type = targets.get(typeId); + if (type != null) { + type.remove(target.getId()); + if (type.isEmpty()) { + targets.remove(target.getTypeId()); + } + + // Remove the attribute node + try { + // Bug 536889 - calculate the node name to remove, replacing slashes with a replacement character + getTargetsPref().node(typeId + DELIMETER1 + target.getId().replaceAll(SLASH, SLASH_REPLACER)) + .removeNode(); + } catch (BackingStoreException e) { + Activator.log(e); + } + + synchronized (listeners) { + for (ILaunchTargetListener listener : listeners) { + listener.launchTargetRemoved(target); + } + } + } + } + + @Override + public void targetStatusChanged(ILaunchTarget target) { + synchronized (listeners) { + for (ILaunchTargetListener listener : listeners) { + listener.launchTargetStatusChanged(target); + } + } + } + + @Override + public ILaunchTarget getDefaultLaunchTarget(ILaunchConfiguration configuration) { + Preferences prefs = getTargetsPref().node("configs"); //$NON-NLS-1$ + String targetId = prefs.get(configuration.getName(), null); + if (targetId != null) { + String[] parts = targetId.split(DELIMETER2); + return getLaunchTarget(parts[0], parts[1]); + } + return null; + } + + @Override + public void setDefaultLaunchTarget(ILaunchConfiguration configuration, ILaunchTarget target) { + Preferences prefs = getTargetsPref().node("configs"); //$NON-NLS-1$ + String targetId = String.join(DELIMETER2, target.getTypeId(), target.getId()); + prefs.put(configuration.getName(), targetId); + try { + prefs.flush(); + } catch (BackingStoreException e) { + Activator.log(e); + } + } + + @Override + public void addListener(ILaunchTargetListener listener) { + listeners.add(listener); + } + + @Override + public void removeListener(ILaunchTargetListener listener) { + listeners.remove(listener); + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetPropertyTester.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetPropertyTester.java new file mode 100644 index 00000000000..88c02ec505a --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetPropertyTester.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import org.eclipse.core.expressions.PropertyTester; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +public class LaunchTargetPropertyTester extends PropertyTester { + + @Override + public boolean test(Object receiver, String property, Object[] args, Object expectedValue) { + if (receiver instanceof ILaunchTarget) { + if (property.equals("launchTargetType")) { //$NON-NLS-1$ + return ((ILaunchTarget) receiver).getTypeId().equals(expectedValue); + } + } + return false; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetWorkingCopy.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetWorkingCopy.java new file mode 100644 index 00000000000..dd68cb73a03 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LaunchTargetWorkingCopy.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy; +import org.osgi.service.prefs.BackingStoreException; + +public class LaunchTargetWorkingCopy extends PlatformObject implements ILaunchTargetWorkingCopy { + + private final LaunchTarget original; + private final Map changes = new HashMap<>(); + private String newId; + + public LaunchTargetWorkingCopy(LaunchTarget original) { + this.original = original; + } + + @Override + public ILaunchTarget getOriginal() { + return original; + } + + @Override + public String getTypeId() { + return original.getTypeId(); + } + + @Override + public String getId() { + return newId != null ? newId : original.getId(); + } + + @Override + public void setId(String id) { + newId = id; + } + + @Override + public ILaunchTargetWorkingCopy getWorkingCopy() { + return this; + } + + @Override + public String getAttribute(String key, String defValue) { + if (changes.containsKey(key)) { + return changes.get(key); + } else { + return original.getAttribute(key, defValue); + } + } + + @Override + public Map getAttributes() { + Map attrs = original.getAttributes(); + attrs.putAll(changes); + return attrs; + } + + @Override + public void setAttribute(String key, String value) { + changes.put(key, value); + } + + @Override + public ILaunchTarget save() { + try { + LaunchTarget target; + if (newId == null || newId.equals(original.getId())) { + target = original; + } else { + // make a new one and remove the old one + ILaunchTargetManager manager = Activator.getLaunchTargetManager(); + target = (LaunchTarget) manager.addLaunchTarget(original.getTypeId(), newId); + for (String key : original.attributes.keys()) { + target.attributes.put(key, original.getAttribute(key, "")); //$NON-NLS-1$ + } + manager.removeLaunchTarget(original); + } + + // set the changed attributes + for (Map.Entry entry : changes.entrySet()) { + String key = entry.getKey(); + String value = entry.getValue(); + if (value != null) { + target.attributes.put(key, value); + } else { + target.attributes.remove(key); + } + } + target.attributes.flush(); + return target; + } catch (BackingStoreException e) { + Activator.log(e); + return original; + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LocalLaunchTargetProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LocalLaunchTargetProvider.java new file mode 100644 index 00000000000..b010d43881f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/internal/target/LocalLaunchTargetProvider.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.internal.target; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.launchbar.core.internal.Messages; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetProvider; +import org.eclipse.launchbar.core.target.ILaunchTargetWorkingCopy; +import org.eclipse.launchbar.core.target.TargetStatus; + +public class LocalLaunchTargetProvider implements ILaunchTargetProvider { + + @Override + public void init(ILaunchTargetManager targetManager) { + if (targetManager.getLaunchTarget(ILaunchTargetManager.localLaunchTargetTypeId, + Messages.LocalTarget_name) == null) { + ILaunchTarget target = targetManager.addLaunchTarget(ILaunchTargetManager.localLaunchTargetTypeId, + Messages.LocalTarget_name); + ILaunchTargetWorkingCopy wc = target.getWorkingCopy(); + wc.setAttribute(ILaunchTarget.ATTR_OS, Platform.getOS()); + wc.setAttribute(ILaunchTarget.ATTR_ARCH, Platform.getOSArch()); + wc.save(); + } + } + + @Override + public TargetStatus getStatus(ILaunchTarget target) { + return TargetStatus.OK_STATUS; + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTarget.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTarget.java new file mode 100644 index 00000000000..e05b0763a03 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTarget.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2015, 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target; + +import java.util.Map; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.launchbar.core.internal.Messages; +import org.eclipse.launchbar.core.internal.target.LaunchTarget; + +/** + * A launch target is a thing that a launch will run on. Launch targets are simple objects with the + * intention that the launch delegates and launches will adapt this object to an object that will + * assist in performing the launch. + * + * @noimplement not to be implemented by clients + */ +public interface ILaunchTarget extends IAdaptable { + + // Standard attributes + public static final String ATTR_OS = "os"; //$NON-NLS-1$ + public static final String ATTR_ARCH = "arch"; //$NON-NLS-1$ + + /** + * The null target, which is the default when no other target is available. + */ + public static final ILaunchTarget NULL_TARGET = new LaunchTarget("null", "---") { //$NON-NLS-1$ //$NON-NLS-2$ + @Override + public ILaunchTargetWorkingCopy getWorkingCopy() { + throw new UnsupportedOperationException(Messages.ILaunchTarget_notSupported); + }; + }; + + /** + * The id for the target. It is unique for each type. + * + * @return id for the target. + */ + String getId(); + + /** + * The user consumable name of the target. + * + * @deprecated this will be the same as the id + * @return name of the target + */ + @Deprecated + default String getName() { + return getId(); + } + + /** + * The type of the target. + * + * @return type of the target + */ + String getTypeId(); + + /** + * Return a string attribute of this target + * + * @param key + * key + * @param defValue + * default value + * @return value of attribute + */ + String getAttribute(String key, String defValue); + + /** + * Returns a read-only map of the attributes. + * + * @return the attributes for this target + * @since 2.1 + */ + Map getAttributes(); + + /** + * Create a working copy of this launch target to allow setting of attributes. It also allows + * changing the id, which results in a new launch target when saved. + * + * @return launch target working copy + */ + ILaunchTargetWorkingCopy getWorkingCopy(); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetListener.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetListener.java new file mode 100644 index 00000000000..29b16a4c68c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetListener.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target; + +/** + * A listener to changes in the list and status of launch targets. + */ +public interface ILaunchTargetListener { + + /** + * A launch target was added. + * + * @param target + * the new launch target + */ + default void launchTargetAdded(ILaunchTarget target) { + } + + /** + * A launch target was removed. + * + * @param target + * the target about to be removed. + */ + default void launchTargetRemoved(ILaunchTarget target) { + } + + /** + * The status of a target has changed. Query the target to find out what the + * new status is. + * + * @param target + * the target whose status has changed + */ + default void launchTargetStatusChanged(ILaunchTarget target) { + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager.java new file mode 100644 index 00000000000..ebb83bef2eb --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target; + +import org.eclipse.debug.core.ILaunchConfiguration; + +/** + * The manager for the launch targets. It is registered as an OSGi service. + * + * @noimplement not to be implemented by clients + */ +public interface ILaunchTargetManager { + + /** + * The type id for the local launch target type. It is the default launch + * target type. It represents launching on the underlying machine on which + * we are running. There is only one launch target of this type which + * represents that machine. + */ + final String localLaunchTargetTypeId = "org.eclipse.launchbar.core.launchTargetType.local"; //$NON-NLS-1$ + + /** + * The list of all launch targets. + * + * @return list of launch targets + */ + ILaunchTarget[] getLaunchTargets(); + + /** + * The list of launch targets with a given type id. + * + * @param typeId + * the launch target type id + * @return list of launch targets + */ + ILaunchTarget[] getLaunchTargetsOfType(String typeId); + + /** + * Return the launch target with the given typeId and name + * + * @param typeId + * type of the launch target + * @param id + * id of the launch target + * @return the launch target + */ + ILaunchTarget getLaunchTarget(String typeId, String id); + + /** + * Return the status of the launch target. + * + * @param target + * the launch target + * @return status + */ + TargetStatus getStatus(ILaunchTarget target); + + /** + * Add a launch target with the given typeId, id, and name. + * + * @param typeId + * type id of the launch target + * @param id + * id for the target. + * @return the created launch target + */ + ILaunchTarget addLaunchTarget(String typeId, String id); + + /** + * Removes a launch target. + * + * @param target + * the launch target to remove + */ + void removeLaunchTarget(ILaunchTarget target); + + /** + * The status of the launch target has changed. + * + * @param target + */ + void targetStatusChanged(ILaunchTarget target); + + /** + * What is the default target to use for this launch configuration. + * + * @param configuration + * launch configuration or null if not set + * @return default target for this launch configuration + */ + ILaunchTarget getDefaultLaunchTarget(ILaunchConfiguration configuration); + + /** + * Set the default target for the given launch configuration. + * + * @param configuration + * launch configuration + * @param target + * default target for this launch configuration + */ + void setDefaultLaunchTarget(ILaunchConfiguration configuration, ILaunchTarget target); + + /** + * Add a listener. + * + * @param listener + */ + void addListener(ILaunchTargetListener listener); + + /** + * Remove a listener. + * + * @param listener + */ + void removeListener(ILaunchTargetListener listener); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager2.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager2.java new file mode 100644 index 00000000000..f22867ee2ee --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetManager2.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2019 Red Hat Inc. and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target; + +/** + * Launch target manager extensions. + * + * @noimplement not to be implemented by clients + */ +public interface ILaunchTargetManager2 { + + /** + * Add a launch target with the given typeId, id, and name but no notification. + * + * @param typeId + * type id of the launch target + * @param id + * id for the target. + * @return the created launch target + */ + ILaunchTarget addLaunchTargetNoNotify(String typeId, String id); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetProvider.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetProvider.java new file mode 100644 index 00000000000..15f660447ec --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetProvider.java @@ -0,0 +1,29 @@ +package org.eclipse.launchbar.core.target; + +/** + * A launch target provider is responsible for managing the list and status of + * launch targets. Providers are associated with launch target types in the + * launchTargetTypes extension point. + */ +public interface ILaunchTargetProvider { + + /** + * Called by the launch target manager when it first sees a target of the + * type. Or on startup if the provider is enabled. It is expected the + * provider will sync the list of targets with it's internal list and alert + * the manager of any non-OK statuses. + * + * @param targetManager + */ + void init(ILaunchTargetManager targetManager); + + /** + * Fetch the status for the launch target. + * + * @param target + * the launch target + * @return status of the launch target + */ + TargetStatus getStatus(ILaunchTarget target); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetWorkingCopy.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetWorkingCopy.java new file mode 100644 index 00000000000..9eb27ff736f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/ILaunchTargetWorkingCopy.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target; + +/** + * Working copy to set attributes on a target and then save them. + */ +public interface ILaunchTargetWorkingCopy extends ILaunchTarget { + + /** + * Get the original launch target. + * + * @return the original launch target + */ + ILaunchTarget getOriginal(); + + /** + * Gives the target a new ID. The save method will return a new target with the given name.e + * + * @param id + * new target ID + */ + void setId(String id); + + /** + * Set an attribute. + * + * @param key + * key + * @param value + * value + */ + void setAttribute(String key, String value); + + /** + * Save the changes to the original working copy. + * + * @return original launch target unless the id was changed in which case returns a new target + */ + ILaunchTarget save(); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/TargetStatus.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/TargetStatus.java new file mode 100644 index 00000000000..bc05387110f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/TargetStatus.java @@ -0,0 +1,32 @@ +package org.eclipse.launchbar.core.target; + +import org.eclipse.launchbar.core.internal.Messages; + +/** + * The status for a launch target. + */ +public class TargetStatus { + + public enum Code { + OK, WARNING, ERROR + } + + private final TargetStatus.Code code; + private final String message; + + public static final TargetStatus OK_STATUS = new TargetStatus(Code.OK, Messages.OK); + + public TargetStatus(TargetStatus.Code code, String message) { + this.code = code; + this.message = message; + } + + public TargetStatus.Code getCode() { + return code; + } + + public String getMessage() { + return message; + } + +} \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ILaunchConfigurationTargetedDelegate.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ILaunchConfigurationTargetedDelegate.java new file mode 100644 index 00000000000..c9005707cd9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ILaunchConfigurationTargetedDelegate.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target.launch; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * An ILaunchConfigurationDelegate2 converted to take ILaunchTarget as an + * additional parameter. + */ +public interface ILaunchConfigurationTargetedDelegate extends ILaunchConfigurationDelegate { + + /** + * Returns a launch object to use when launching the given launch + * configuration in the given mode, or null if a new default + * launch object should be created by the debug platform. If a launch object + * is returned, its launch mode must match that of the mode specified in + * this method call. + * + * @param configuration + * the configuration being launched + * @param mode + * the mode the configuration is being launched in + * @return a launch object or null + * @throws CoreException + * if unable to launch + */ + public ITargetedLaunch getLaunch(ILaunchConfiguration configuration, String mode, ILaunchTarget target) + throws CoreException; + + /** + * Optionally performs any required building before launching the given + * configuration in the specified mode, and returns whether the debug + * platform should perform an incremental workspace build before the launch + * continues. If false is returned the launch will proceed + * without further building, and if true is returned an + * incremental build will be performed on the workspace before launching. + *

+ * This method is only called if the launch is invoked with flag indicating + * building should take place before the launch. This is done via the method + * ILaunchConfiguration.launch(String mode, IProgressMonitor monitor, boolean build) + * . + *

+ * + * @param configuration + * the configuration being launched + * @param mode + * the mode the configuration is being launched in + * @param monitor + * progress monitor, or null. A cancelable progress + * monitor is provided by the Job framework. It should be noted + * that the setCanceled(boolean) method should never be called on + * the provided monitor or the monitor passed to any delegates + * from this method; due to a limitation in the progress monitor + * framework using the setCanceled method can cause entire + * workspace batch jobs to be canceled, as the canceled flag is + * propagated up the top-level parent monitor. The provided + * monitor is not guaranteed to have been started. + * @return whether the debug platform should perform an incremental + * workspace build before the launch + * @throws CoreException + * if an exception occurs while building + */ + public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException; + + /** + * Returns whether a launch should proceed. This method is called after + * preLaunchCheck() and buildForLaunch() providing + * a final chance for this launch delegate to abort a launch if required. + * For example, a delegate could cancel a launch if it discovered + * compilation errors that would prevent the launch from succeeding. + * + * @param configuration + * the configuration being launched + * @param mode + * launch mode + * @param monitor + * progress monitor, or null. A cancelable progress + * monitor is provided by the Job framework. It should be noted + * that the setCanceled(boolean) method should never be called on + * the provided monitor or the monitor passed to any delegates + * from this method; due to a limitation in the progress monitor + * framework using the setCanceled method can cause entire + * workspace batch jobs to be canceled, as the canceled flag is + * propagated up the top-level parent monitor. The provided + * monitor is not guaranteed to have been started. + * @return whether the launch should proceed + * @throws CoreException + * if an exception occurs during final checks + */ + public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException; + + /** + * Returns whether a launch should proceed. This method is called first in + * the launch sequence providing an opportunity for this launch delegate to + * abort the launch. + * + * @param configuration + * configuration being launched + * @param mode + * launch mode + * @param monitor + * progress monitor, or null. A cancelable progress + * monitor is provided by the Job framework. It should be noted + * that the setCanceled(boolean) method should never be called on + * the provided monitor or the monitor passed to any delegates + * from this method; due to a limitation in the progress monitor + * framework using the setCanceled method can cause entire + * workspace batch jobs to be canceled, as the canceled flag is + * propagated up the top-level parent monitor. The provided + * monitor is not guaranteed to have been started. + * @return whether the launch should proceed + * @throws CoreException + * if an exception occurs while performing pre-launch checks + */ + public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException; + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ITargetedLaunch.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ITargetedLaunch.java new file mode 100644 index 00000000000..31da57d676e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/ITargetedLaunch.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target.launch; + +import org.eclipse.debug.core.ILaunch; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * A launch that knows what target it's running on. + */ +public interface ITargetedLaunch extends ILaunch { + + /** + * The target this launch will or is running on. + * + * @return launch target + */ + ILaunchTarget getLaunchTarget(); + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/LaunchConfigurationTargetedDelegate.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/LaunchConfigurationTargetedDelegate.java new file mode 100644 index 00000000000..00d621e78bd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/LaunchConfigurationTargetedDelegate.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target.launch; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.model.LaunchConfigurationDelegate; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * An implementation of the ILaunchConfigurationTargetedDelegate. + * + * Implements the ILaunchConfigurationDelegate2 interfaces to pick out the + * default target and pass it the targeted delegate methods. + * + * The default for the targeted delegate methods is to call the non targeted + * methods in the super class. + * + */ +public abstract class LaunchConfigurationTargetedDelegate extends LaunchConfigurationDelegate + implements ILaunchConfigurationTargetedDelegate { + + @Override + public ILaunch getLaunch(ILaunchConfiguration configuration, String mode) throws CoreException { + ILaunchTarget target = Activator.getLaunchTargetManager().getDefaultLaunchTarget(configuration); + return getLaunch(configuration, mode, target); + } + + @Override + public ITargetedLaunch getLaunch(ILaunchConfiguration configuration, String mode, ILaunchTarget target) + throws CoreException { + return new TargetedLaunch(configuration, mode, target, null); + } + + @Override + public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) + throws CoreException { + ILaunchTarget target = Activator.getLaunchTargetManager().getDefaultLaunchTarget(configuration); + return buildForLaunch(configuration, mode, target, monitor); + } + + @Override + public boolean buildForLaunch(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException { + return super.buildForLaunch(configuration, mode, monitor); + } + + public boolean superBuildForLaunch(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) + throws CoreException { + return super.buildForLaunch(configuration, mode, monitor); + } + + @Override + public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) + throws CoreException { + ILaunchTarget target = Activator.getLaunchTargetManager().getDefaultLaunchTarget(configuration); + return preLaunchCheck(configuration, mode, target, monitor); + } + + @Override + public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException { + return super.preLaunchCheck(configuration, mode, monitor); + } + + @Override + public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) + throws CoreException { + ILaunchTarget target = Activator.getLaunchTargetManager().getDefaultLaunchTarget(configuration); + return finalLaunchCheck(configuration, mode, target, monitor); + } + + @Override + public boolean finalLaunchCheck(ILaunchConfiguration configuration, String mode, ILaunchTarget target, + IProgressMonitor monitor) throws CoreException { + return super.finalLaunchCheck(configuration, mode, monitor); + } + +} diff --git a/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/TargetedLaunch.java b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/TargetedLaunch.java new file mode 100644 index 00000000000..6ac911185a3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.core/src/org/eclipse/launchbar/core/target/launch/TargetedLaunch.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.core.target.launch; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.Launch; +import org.eclipse.debug.core.model.ISourceLocator; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * A ITargetedLaunch implementation that simply extends the standard Launch + * class to store the launch target. + */ +public class TargetedLaunch extends Launch implements ITargetedLaunch { + + private final ILaunchTarget launchTarget; + + public TargetedLaunch(ILaunchConfiguration launchConfiguration, String mode, ILaunchTarget launchTarget, + ISourceLocator locator) { + super(launchConfiguration, mode, locator); + this.launchTarget = launchTarget; + } + + @Override + public ILaunchTarget getLaunchTarget() { + return launchTarget; + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote.core/.classpath b/launchbar/org.eclipse.launchbar.remote.core/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.remote.core/.project b/launchbar/org.eclipse.launchbar.remote.core/.project new file mode 100644 index 00000000000..74f0f93e954 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.remote.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2b6ecff8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +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.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..d2dc703ba9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.remote.core/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.remote.core/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..82adb292f6b --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/META-INF/MANIFEST.MF @@ -0,0 +1,15 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LaunchBar Remote Core +Bundle-SymbolicName: org.eclipse.launchbar.remote.core;singleton:=true +Bundle-Version: 1.0.2.qualifier +Bundle-Activator: org.eclipse.launchbar.remote.core.internal.Activator +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.launchbar.core;bundle-version="2.0.0", + org.eclipse.remote.core;bundle-version="2.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.launchbar.remote.core, + org.eclipse.launchbar.remote.core.internal;x-friends:="org.eclipse.launchbar.remote.ui" +Automatic-Module-Name: org.eclipse.launchbar.remote.core diff --git a/launchbar/org.eclipse.launchbar.remote.core/about.html b/launchbar/org.eclipse.launchbar.remote.core/about.html new file mode 100644 index 00000000000..164f781a8fd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

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

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.remote.core/build.properties b/launchbar/org.eclipse.launchbar.remote.core/build.properties new file mode 100644 index 00000000000..bdcc25a2886 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.xml diff --git a/launchbar/org.eclipse.launchbar.remote.core/plugin.xml b/launchbar/org.eclipse.launchbar.remote.core/plugin.xml new file mode 100644 index 00000000000..326a151ef5e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/plugin.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/RemoteLaunchTargetProvider.java b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/RemoteLaunchTargetProvider.java new file mode 100644 index 00000000000..ee2cbbf34f3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/RemoteLaunchTargetProvider.java @@ -0,0 +1,108 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.core; + +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.ILaunchTargetProvider; +import org.eclipse.launchbar.core.target.TargetStatus; +import org.eclipse.launchbar.core.target.TargetStatus.Code; +import org.eclipse.launchbar.remote.core.internal.Activator; +import org.eclipse.launchbar.remote.core.internal.Messages; +import org.eclipse.remote.core.IRemoteConnection; +import org.eclipse.remote.core.IRemoteConnectionChangeListener; +import org.eclipse.remote.core.IRemoteConnectionType; +import org.eclipse.remote.core.IRemoteConnectionWorkingCopy; +import org.eclipse.remote.core.IRemoteServicesManager; +import org.eclipse.remote.core.RemoteConnectionChangeEvent; + +public abstract class RemoteLaunchTargetProvider implements ILaunchTargetProvider, IRemoteConnectionChangeListener { + + private static final TargetStatus CLOSED = new TargetStatus(Code.ERROR, Messages.RemoteLaunchTargetProvider_Closed); + + private ILaunchTargetManager targetManager; + + protected abstract String getTypeId(); + + protected void initLaunchTarget(ILaunchTarget target) { + // default nothing + } + + @Override + public void init(ILaunchTargetManager targetManager) { + this.targetManager = targetManager; + String typeId = getTypeId(); + + IRemoteServicesManager remoteManager = Activator.getService(IRemoteServicesManager.class); + + // Remove missing ones + for (ILaunchTarget target : targetManager.getLaunchTargetsOfType(typeId)) { + IRemoteConnection connection = target.getAdapter(IRemoteConnection.class); + if (connection == null) { + targetManager.removeLaunchTarget(target); + } + } + + // Add new ones + IRemoteConnectionType remoteType = remoteManager.getConnectionType(typeId); + for (IRemoteConnection remote : remoteType.getConnections()) { + String id = remote.getName(); + if (targetManager.getLaunchTarget(typeId, id) == null) { + initLaunchTarget(targetManager.addLaunchTarget(typeId, id)); + } + } + + remoteManager.addRemoteConnectionChangeListener(this); + } + + @Override + public TargetStatus getStatus(ILaunchTarget target) { + IRemoteConnection connection = target.getAdapter(IRemoteConnection.class); + if (connection != null) { + if (connection.isOpen()) { + return TargetStatus.OK_STATUS; + } else { + return CLOSED; + } + } + return new TargetStatus(Code.ERROR, Messages.RemoteLaunchTargetProvider_Missing); + } + + @Override + public void connectionChanged(RemoteConnectionChangeEvent event) { + IRemoteConnection connection = event.getConnection(); + if (connection.getConnectionType().getId().equals(getTypeId())) { + switch (event.getType()) { + case RemoteConnectionChangeEvent.CONNECTION_ADDED: + initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), connection.getName())); + break; + case RemoteConnectionChangeEvent.CONNECTION_REMOVED: + ILaunchTarget target = targetManager.getLaunchTarget(getTypeId(), connection.getName()); + if (target != null) { + targetManager.removeLaunchTarget(target); + } + break; + case RemoteConnectionChangeEvent.CONNECTION_RENAMED: + if (connection instanceof IRemoteConnectionWorkingCopy) { + IRemoteConnectionWorkingCopy wc = (IRemoteConnectionWorkingCopy) connection; + IRemoteConnection original = ((IRemoteConnectionWorkingCopy) connection).getOriginal(); + target = targetManager.getLaunchTarget(getTypeId(), original.getName()); + if (target != null) { + targetManager.removeLaunchTarget(target); + } + initLaunchTarget(targetManager.addLaunchTarget(getTypeId(), wc.getName())); + } + break; + } + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Activator.java b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Activator.java new file mode 100644 index 00000000000..1583f34c241 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Activator.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.core.internal; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.launchbar.remote.core"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + public static Activator getDefault() { + return plugin; + } + + public static T getService(Class service) { + BundleContext context = plugin.getBundle().getBundleContext(); + ServiceReference ref = context.getServiceReference(service); + return ref != null ? context.getService(ref) : null; + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Messages.java b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Messages.java new file mode 100644 index 00000000000..6a27294d7b4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/Messages.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.core.internal; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.launchbar.remote.core.internal.messages"; //$NON-NLS-1$ + public static String RemoteLaunchTargetProvider_Closed; + public static String RemoteLaunchTargetProvider_Missing; + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/RemoteTargetAdapterFactory.java b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/RemoteTargetAdapterFactory.java new file mode 100644 index 00000000000..9fd2a658efd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/RemoteTargetAdapterFactory.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.core.internal; + +import org.eclipse.core.runtime.IAdapterFactory; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.remote.core.IRemoteConnection; +import org.eclipse.remote.core.IRemoteConnectionType; +import org.eclipse.remote.core.IRemoteServicesManager; + +public class RemoteTargetAdapterFactory implements IAdapterFactory { + + private static final IRemoteServicesManager remoteManager = Activator.getService(IRemoteServicesManager.class); + + @SuppressWarnings("unchecked") + @Override + public T getAdapter(Object adaptableObject, Class adapterType) { + if (adaptableObject instanceof ILaunchTarget) { + ILaunchTarget target = (ILaunchTarget) adaptableObject; + IRemoteConnectionType remoteType = remoteManager.getConnectionType(target.getTypeId()); + if (remoteType != null) { + return (T) remoteType.getConnection(target.getId()); + } + } + return null; + } + + @Override + public Class[] getAdapterList() { + return new Class[] { IRemoteConnection.class }; + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/messages.properties b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/messages.properties new file mode 100644 index 00000000000..fcc2297dd0f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.core/src/org/eclipse/launchbar/remote/core/internal/messages.properties @@ -0,0 +1,12 @@ +#****************************************************************************** +# Copyright (c) 2015 QNX Software Systems and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +#****************************************************************************** +RemoteLaunchTargetProvider_Closed=Closed +RemoteLaunchTargetProvider_Missing=Connection missing diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.classpath b/launchbar/org.eclipse.launchbar.remote.ui/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.project b/launchbar/org.eclipse.launchbar.remote.ui/.project new file mode 100644 index 00000000000..ec6ff73a3ae --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.remote.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2b6ecff8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +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.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..d2dc703ba9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.remote.ui/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.remote.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..8d3bd235f0b --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Remote Launch Target UI +Bundle-SymbolicName: org.eclipse.launchbar.remote.ui;singleton:=true +Bundle-Version: 1.0.1.qualifier +Bundle-Activator: org.eclipse.launchbar.remote.ui.internal.Activator +Bundle-Vendor: Eclipse CDT +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.remote.core;bundle-version="2.0.0", + org.eclipse.remote.ui;bundle-version="2.0.0", + org.eclipse.launchbar.core;bundle-version="2.0.0", + org.eclipse.launchbar.ui;bundle-version="2.0.0", + org.eclipse.launchbar.remote.core;bundle-version="1.0.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: org.eclipse.launchbar.remote.ui +Automatic-Module-Name: org.eclipse.launchbar.remote.ui diff --git a/launchbar/org.eclipse.launchbar.remote.ui/build.properties b/launchbar/org.eclipse.launchbar.remote.ui/build.properties new file mode 100644 index 00000000000..34d2e4d2dad --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/RemoteLaunchTargetLabelProvider.java b/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/RemoteLaunchTargetLabelProvider.java new file mode 100644 index 00000000000..c6d76cf7872 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/RemoteLaunchTargetLabelProvider.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.ui; + +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.remote.core.IRemoteConnection; +import org.eclipse.remote.ui.IRemoteUIConnectionService; +import org.eclipse.swt.graphics.Image; + +public class RemoteLaunchTargetLabelProvider extends LabelProvider { + + @Override + public String getText(Object element) { + if (element instanceof ILaunchTarget) { + IRemoteConnection connection = ((ILaunchTarget) element).getAdapter(IRemoteConnection.class); + if (connection != null) { + IRemoteUIConnectionService uiService = connection.getConnectionType() + .getService(IRemoteUIConnectionService.class); + if (uiService != null) { + return uiService.getLabelProvider().getText(connection); + } + } + } + return super.getText(element); + } + + @Override + public Image getImage(Object element) { + if (element instanceof ILaunchTarget) { + IRemoteConnection connection = ((ILaunchTarget) element).getAdapter(IRemoteConnection.class); + if (connection != null) { + IRemoteUIConnectionService uiService = connection.getConnectionType() + .getService(IRemoteUIConnectionService.class); + if (uiService != null) { + return uiService.getLabelProvider().getImage(connection); + } + } + } + return super.getImage(element); + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/internal/Activator.java b/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/internal/Activator.java new file mode 100644 index 00000000000..16e1fcb7fcd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote.ui/src/org/eclipse/launchbar/remote/ui/internal/Activator.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.remote.ui.internal; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.launchbar.remote.ui"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + public static Activator getDefault() { + return plugin; + } + + public static T getService(Class service) { + BundleContext context = plugin.getBundle().getBundleContext(); + ServiceReference ref = context.getServiceReference(service); + return ref != null ? context.getService(ref) : null; + } + +} diff --git a/launchbar/org.eclipse.launchbar.remote/.project b/launchbar/org.eclipse.launchbar.remote/.project new file mode 100644 index 00000000000..d9d66858d17 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote/.project @@ -0,0 +1,17 @@ + + + org.eclipse.launchbar.remote-feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/launchbar/org.eclipse.launchbar.remote/build.properties b/launchbar/org.eclipse.launchbar.remote/build.properties new file mode 100644 index 00000000000..b3a611b5c93 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote/build.properties @@ -0,0 +1,2 @@ +bin.includes = feature.xml,\ + feature.properties diff --git a/launchbar/org.eclipse.launchbar.remote/feature.properties b/launchbar/org.eclipse.launchbar.remote/feature.properties new file mode 100644 index 00000000000..a500c84cb5c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote/feature.properties @@ -0,0 +1,36 @@ +############################################################################### +# Copyright (c) 2005, 2010 IBM Corporation and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# features.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. + +# "featureName" property - name of the feature +featureName=Remote Launch Targets + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse CDT + +# "description" property - description of the feature +description=Support for IRemoteConnections as ILaunchTargets + +# copyright +copyright=\ +Copyright (c) 2015 QNX Software Systems and others\n\ +This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License 2.0\n\ +which accompanies this distribution, and is available at\n\ +https://www.eclipse.org/legal/epl-2.0/ + diff --git a/launchbar/org.eclipse.launchbar.remote/feature.xml b/launchbar/org.eclipse.launchbar.remote/feature.xml new file mode 100644 index 00000000000..4f57caf2c12 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.remote/feature.xml @@ -0,0 +1,36 @@ + + + + + %description + + + + %copyright + + + + %license + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.classpath b/launchbar/org.eclipse.launchbar.ui.controls/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.project b/launchbar/org.eclipse.launchbar.ui.controls/.project new file mode 100644 index 00000000000..16aad7cf740 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.ui.controls + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2b6ecff8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +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.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..d2dc703ba9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.ui.controls/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.ui.controls/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..ba08d341bd9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Launch Bar UI Controls +Bundle-SymbolicName: org.eclipse.launchbar.ui.controls;singleton:=true +Bundle-Version: 1.0.100.qualifier +Bundle-Activator: org.eclipse.launchbar.ui.controls.internal.Activator +Bundle-Vendor: Eclipse CDT +Require-Bundle: org.eclipse.osgi.services;bundle-version="3.5.0", + org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.e4.core.di.annotations;bundle-version="1.5.0", + org.eclipse.e4.core.contexts;bundle-version="1.5.0", + org.eclipse.e4.core.services;bundle-version="2.0.0", + org.eclipse.e4.ui.model.workbench;bundle-version="1.2.0", + org.eclipse.e4.ui.workbench;bundle-version="1.4.0", + org.eclipse.debug.ui;bundle-version="3.11.200", + org.eclipse.launchbar.core;bundle-version="2.0.0", + org.eclipse.launchbar.ui;bundle-version="2.0.0" +Import-Package: javax.annotation, + javax.inject +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Export-Package: org.eclipse.launchbar.ui.controls.internal;x-friends:="org.eclipse.launchbar.ui.tests" +Automatic-Module-Name: org.eclipse.launchbar.ui.controls diff --git a/launchbar/org.eclipse.launchbar.ui.controls/about.html b/launchbar/org.eclipse.launchbar.ui.controls/about.html new file mode 100644 index 00000000000..164f781a8fd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

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

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.ui.controls/build.properties b/launchbar/org.eclipse.launchbar.ui.controls/build.properties new file mode 100644 index 00000000000..5ac60bf9b00 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.xml,\ + plugin.properties,\ + icons/ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/bgButton.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/bgButton.png new file mode 100644 index 00000000000..e951bd34a15 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/bgButton.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/build.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/build.png new file mode 100755 index 00000000000..110cb3a6315 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/build.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_24.png new file mode 100644 index 00000000000..d917acea6ab Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_hot_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_hot_24.png new file mode 100644 index 00000000000..e77ea27915e Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/build2_hot_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/build_16.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/build_16.png new file mode 100644 index 00000000000..c0272bb5d88 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/build_16.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/config_config.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/config_config.png new file mode 100644 index 00000000000..c3b2ddc8887 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/config_config.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/connected.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/connected.png new file mode 100644 index 00000000000..4a67a216044 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/connected.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/disconnected.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/disconnected.png new file mode 100644 index 00000000000..84b1395766c Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/disconnected.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/edit_cold.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/edit_cold.png new file mode 100644 index 00000000000..5a49a09fa00 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/edit_cold.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_debug_32x32.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_debug_32x32.png new file mode 100644 index 00000000000..eb338673155 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_debug_32x32.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_profile_32x32.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_profile_32x32.png new file mode 100644 index 00000000000..1e28fd9f8b0 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_profile_32x32.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_run_32x32.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_run_32x32.png new file mode 100644 index 00000000000..d704b703b71 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/icon_run_32x32.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/launch.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch.png new file mode 100644 index 00000000000..d704b703b71 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_24.png new file mode 100644 index 00000000000..b8cee6ed158 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_hot_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_hot_24.png new file mode 100644 index 00000000000..21cba47b579 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch2_hot_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_16.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_16.png new file mode 100644 index 00000000000..08571c1f22e Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_16.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_base_blank.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_base_blank.png new file mode 100644 index 00000000000..9259f65398f Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/launch_base_blank.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/stop.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop.png new file mode 100755 index 00000000000..b55b7c4e4c6 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_24.png new file mode 100644 index 00000000000..88ba331b3e2 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_hot_24.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_hot_24.png new file mode 100644 index 00000000000..d3ec021963b Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop2_hot_24.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/icons/stop_16.png b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop_16.png new file mode 100644 index 00000000000..3544673b689 Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui.controls/icons/stop_16.png differ diff --git a/launchbar/org.eclipse.launchbar.ui.controls/plugin.properties b/launchbar/org.eclipse.launchbar.ui.controls/plugin.properties new file mode 100644 index 00000000000..1a942c2caa3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/plugin.properties @@ -0,0 +1,3 @@ +launchToolBar.label = LaunchBar +targetsView.name = Launch Targets +targetsContent.name = Launch Targets diff --git a/launchbar/org.eclipse.launchbar.ui.controls/plugin.xml b/launchbar/org.eclipse.launchbar.ui.controls/plugin.xml new file mode 100644 index 00000000000..653a81b1021 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/plugin.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Activator.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Activator.java new file mode 100644 index 00000000000..382b137a1bc --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Activator.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.launchbar.ui.controls"; //$NON-NLS-1$ + + // images + public static final String IMG_BUTTON_BACKGROUND = "bgButton"; //$NON-NLS-1$ + public static final String IMG_BUTTON_BUILD = "build"; //$NON-NLS-1$ + public static final String IMG_BUTTON_LAUNCH = "launch"; //$NON-NLS-1$ + public static final String IMG_BUTTON_STOP = "stop"; //$NON-NLS-1$ + public static final String IMG_CONFIG_CONFIG = "config_config"; //$NON-NLS-1$ + public static final String IMG_EDIT_COLD = "edit_cold"; //$NON-NLS-1$ + + // Preference ids + public static final String PREF_ENABLE_LAUNCHBAR = "enableLaunchBar"; //$NON-NLS-1$ + public static final String PREF_ALWAYS_TARGETSELECTOR = "alwaysTargetSelector"; //$NON-NLS-1$ + public static final String PREF_ENABLE_BUILDBUTTON = "enableBuildButton"; //$NON-NLS-1$ + public static final String PREF_LAUNCH_HISTORY_SIZE = "launchHistorySize"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + ImageRegistry imageRegistry = getImageRegistry(); + imageRegistry.put(IMG_BUTTON_BACKGROUND, imageDescriptorFromPlugin(PLUGIN_ID, "icons/bgButton.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_BUILD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/build_16.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_LAUNCH, imageDescriptorFromPlugin(PLUGIN_ID, "icons/launch_16.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_BUTTON_STOP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/stop_16.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_CONFIG_CONFIG, imageDescriptorFromPlugin(PLUGIN_ID, "icons/config_config.png")); //$NON-NLS-1$ + imageRegistry.put(IMG_EDIT_COLD, imageDescriptorFromPlugin(PLUGIN_ID, "icons/edit_cold.png")); //$NON-NLS-1$ + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + public static Activator getDefault() { + return plugin; + } + + public static T getService(Class service) { + BundleContext context = plugin.getBundle().getBundleContext(); + ServiceReference ref = context.getServiceReference(service); + return ref != null ? context.getService(ref) : null; + } + + public static void log(Throwable e) { + IStatus status; + if (e instanceof CoreException) { + status = ((CoreException) e).getStatus(); + } else { + status = new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e); + } + plugin.getLog().log(status); + } + + public static void log(String msg) { + plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, msg)); + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CButton.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CButton.java new file mode 100644 index 00000000000..4b33fbfbb58 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CButton.java @@ -0,0 +1,137 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseTrackAdapter; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.TypedListener; + +public class CButton extends Canvas { + private boolean inButton; + private Image hotImage; + private Image coldImage; + + public CButton(Composite parent, int style) { + super(parent, style); + addPaintListener(e -> { + if (inButton) { + if (hotImage != null) { + e.gc.drawImage(hotImage, 0, 0); + } else if (coldImage != null) { + e.gc.drawImage(coldImage, 0, 0); + } + } else { + if (coldImage != null) { + e.gc.drawImage(coldImage, 0, 0); + } else if (hotImage != null) { + e.gc.drawImage(hotImage, 0, 0); + } + } + }); + addMouseTrackListener(new MouseTrackAdapter() { + @Override + public void mouseEnter(MouseEvent e) { + setSelected(true); + } + + @Override + public void mouseExit(MouseEvent e) { + setSelected(false); + } + }); + addMouseListener(new MouseAdapter() { + @Override + public void mouseUp(MouseEvent e) { + setSelected(true); + handleSelection(inButton); + } + + @Override + public void mouseDoubleClick(MouseEvent e) { + setSelected(true); + handleDefaultSelection(inButton); + } + }); + } + + @Override + public void dispose() { + super.dispose(); + if (hotImage != null) + hotImage.dispose(); + if (coldImage != null) + coldImage.dispose(); + } + + @Override + public Point computeSize(int wHint, int hHint, boolean changed) { + int width = 0; + int height = 0; + if (hotImage != null) { + Rectangle bounds = hotImage.getBounds(); + width = bounds.width; + height = bounds.height; + } + if (coldImage != null) { + Rectangle bounds = coldImage.getBounds(); + if (bounds.width > width) + width = bounds.width; + if (bounds.height > height) + height = bounds.height; + } + return new Point(width, height); + } + + public void setHotImage(Image image) { + this.hotImage = image; + } + + public void setColdImage(Image image) { + this.coldImage = image; + } + + protected void handleSelection(boolean selection) { + // Send event + notifyListeners(SWT.Selection, null); + } + + protected void handleDefaultSelection(boolean selection) { + // Send event + notifyListeners(SWT.DefaultSelection, null); + } + + public void addSelectionListener(SelectionListener listener) { + checkWidget(); + TypedListener typedListener = new TypedListener(listener); + addListener(SWT.Selection, typedListener); + addListener(SWT.DefaultSelection, typedListener); + } + + public void setSelected(boolean sel) { + inButton = sel; + redraw(); + } + + public boolean isSelected() { + return inButton; + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CSelector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CSelector.java new file mode 100644 index 00000000000..ce1ccc4cbb6 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/CSelector.java @@ -0,0 +1,522 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import java.util.Comparator; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.LineAttributes; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; + +public abstract class CSelector extends Composite { + private IStructuredContentProvider contentProvider; + private ILabelProvider labelProvider; + private Comparator sorter; + private Comparator sorterTop; + private Object input; + private Composite buttonComposite; + private static final int arrowMax = 2; + private Transition arrowTransition; + private Object selection; + private boolean mouseOver; + private Label currentIcon; + private Label currentLabel; + private Shell popup; + private LaunchBarListViewer listViewer; + private Job delayJob; + private MouseListener mouseListener = new MouseAdapter() { + @Override + public void mouseUp(MouseEvent event) { + if (popup == null || popup.isDisposed()) { + setFocus(); + openPopup(); + } else { + closePopup(); + } + } + }; + + protected boolean myIsFocusAncestor(Control control) { + while (control != null && control != this && !(control instanceof Shell)) { + control = control.getParent(); + } + return control == this; + } + + private Listener focusOutListener = new Listener() { + private Job closingJob; + + @Override + public void handleEvent(Event event) { + switch (event.type) { + case SWT.FocusIn: + if (closingJob != null) + closingJob.cancel(); + if (event.widget instanceof Control && myIsFocusAncestor((Control) event.widget)) { + break; // not closing + } + if (!isPopUpInFocus()) { + closePopup(); + } + break; + case SWT.FocusOut: + if (isPopUpInFocus()) { + // we about to loose focus from popup children, but it may + // go to another child, lets schedule a job to wait before + // we close + if (closingJob != null) + closingJob.cancel(); + closingJob = new Job(Messages.CSelector_0) { + @Override + protected IStatus run(IProgressMonitor monitor) { + if (monitor.isCanceled()) + return Status.CANCEL_STATUS; + closePopup(); + closingJob = null; + return Status.OK_STATUS; + } + }; + closingJob.schedule(300); + } + break; + case SWT.MouseUp: + if (popup != null && !popup.isDisposed()) { + Point loc = getDisplay().getCursorLocation(); + if (!popup.getBounds().contains(loc) && !getBounds().contains(getParent().toControl(loc))) { + closePopup(); + } + } + break; + default: + break; + } + } + }; + + public CSelector(Composite parent, int style) { + super(parent, style); + setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_BACKGROUND)); + + GridLayout mainButtonLayout = new GridLayout(); + setLayout(mainButtonLayout); + addPaintListener(e -> { + GC gc = e.gc; + gc.setBackground(getBackground()); + gc.setForeground(getOutlineColor()); + Point size = getSize(); + final int arc = 3; + gc.fillRoundRectangle(0, 0, size.x - 1, size.y - 1, arc, arc); + gc.drawRoundRectangle(0, 0, size.x - 1, size.y - 1, arc, arc); + }); + addMouseListener(mouseListener); + } + + private boolean isPopUpInFocus() { + Control focusControl = getDisplay().getFocusControl(); + if (focusControl != null && focusControl.getShell() == popup) { + return true; + } + return false; + } + + @Override + public void dispose() { + super.dispose(); + if (popup != null) + popup.dispose(); + } + + public void setDelayedSelection(final Object element, long millis) { + if (delayJob != null) + delayJob.cancel(); + delayJob = new Job(Messages.CSelector_1) { + @Override + protected IStatus run(final IProgressMonitor monitor) { + if (monitor.isCanceled()) + return Status.CANCEL_STATUS; + if (isDisposed()) + return Status.CANCEL_STATUS; + getDisplay().asyncExec(() -> { + if (monitor.isCanceled()) + return; + setSelection(element); + }); + return Status.OK_STATUS; + } + }; + delayJob.schedule(millis); + } + + public void setSelection(Object element) { + if (isDisposed()) + return; + this.selection = element; + if (buttonComposite != null) + buttonComposite.dispose(); + String toolTipText = getToolTipText(); + boolean editable = false; + int columns = 2; + Image image = labelProvider.getImage(element); + if (image != null) + columns++; + editable = isEditable(element); + if (editable) + columns++; + buttonComposite = new Composite(this, SWT.NONE); + GridLayout buttonLayout = new GridLayout(columns, false); + buttonLayout.marginHeight = buttonLayout.marginWidth = 0; + buttonComposite.setLayout(buttonLayout); + buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + buttonComposite.setBackground(getBackground()); + buttonComposite.addMouseListener(mouseListener); + buttonComposite.setToolTipText(toolTipText); + if (element != null) { + if (image != null) { + Label icon = createImage(buttonComposite, image); + icon.addMouseListener(mouseListener); + currentIcon = icon; + currentIcon.setToolTipText(toolTipText); + } + Label label = createLabel(buttonComposite, element); + label.addMouseListener(mouseListener); + currentLabel = label; + currentLabel.setToolTipText(toolTipText); + } else { + Composite blank = new Composite(buttonComposite, SWT.NONE); + blank.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + currentIcon = null; + currentLabel = null; + } + final Canvas arrow = new Canvas(buttonComposite, SWT.NONE) { + @Override + public Point computeSize(int wHint, int hHint, boolean changed) { + return new Point(12, 16); + } + }; + arrow.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true)); + arrow.setBackground(getBackground()); + arrow.setForeground(getForeground()); + arrowTransition = new Transition(arrow, arrowMax, 80); + arrow.addPaintListener(e -> { + final int hPadding = 2; + GC gc = e.gc; + LineAttributes attributes = new LineAttributes(2); + attributes.cap = SWT.CAP_ROUND; + gc.setLineAttributes(attributes); + gc.setAlpha(mouseOver ? 255 : 100); + Rectangle bounds = arrow.getBounds(); + int arrowWidth = bounds.width - hPadding * 2; + int current = arrowTransition.getCurrent(); + gc.drawPolyline(new int[] { hPadding, bounds.height / 2 - current, hPadding + (arrowWidth / 2), + bounds.height / 2 + current, hPadding + arrowWidth, bounds.height / 2 - current }); + }); + arrow.addMouseListener(mouseListener); + if (editable) { + final EditButton editButton = new EditButton(buttonComposite, SWT.NONE); + editButton.setData(LaunchBarWidgetIds.ID, LaunchBarWidgetIds.EDIT); + editButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true)); + editButton.setBackground(getBackground()); + editButton.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + // Need to run this after the current event storm + // Or we get a disposed error. + getDisplay().asyncExec(() -> { + if (CSelector.this.selection != null) + handleEdit(selection); + }); + } + }); + } + layout(); + } + + protected abstract void fireSelectionChanged(); + + public Object getSelection() { + return selection; + } + + public MouseListener getMouseListener() { + return mouseListener; + } + + protected void openPopup() { + Object[] elements = contentProvider.getElements(input); + if (elements.length == 0 && !hasActionArea()) + return; + arrowTransition.to(-arrowMax); + if (popup != null && !popup.isDisposed()) { + popup.dispose(); + } + popup = new Shell(getShell(), SWT.TOOL | SWT.ON_TOP | SWT.RESIZE); + popup.setData(LaunchBarWidgetIds.ID, LaunchBarWidgetIds.POPUP); + popup.setLayout(GridLayoutFactory.fillDefaults().spacing(0, 0).create()); + popup.setBackground(getBackground()); + listViewer = new LaunchBarListViewer(popup); + initializeListViewer(listViewer); + listViewer.setFilterVisible(elements.length > 7); + listViewer.setInput(input); + listViewer.addSelectionChangedListener(event -> { + if (!listViewer.isFinalSelection()) + return; + StructuredSelection ss = (StructuredSelection) event.getSelection(); + if (!ss.isEmpty()) { + setSelection(ss.getFirstElement()); + fireSelectionChanged(); + } + closePopup(); + }); + if (hasActionArea()) + createActionArea(popup); + Rectangle buttonBounds = getBounds(); + Point popupLocation = popup.getDisplay().map(this, null, 0, buttonBounds.height); + popup.setLocation(popupLocation.x, popupLocation.y + 5); + restoreShellSize(); + popup.setVisible(true); + popup.setFocus(); + getDisplay().addFilter(SWT.FocusIn, focusOutListener); + getDisplay().addFilter(SWT.FocusOut, focusOutListener); + getDisplay().addFilter(SWT.MouseUp, focusOutListener); + popup.addDisposeListener(e -> { + getDisplay().removeFilter(SWT.FocusIn, focusOutListener); + getDisplay().removeFilter(SWT.FocusOut, focusOutListener); + getDisplay().removeFilter(SWT.MouseUp, focusOutListener); + saveShellSize(); + }); + } + + protected String getDialogPreferencePrefix() { + return getClass().getSimpleName(); + } + + protected void restoreShellSize() { + Point size = popup.computeSize(SWT.DEFAULT, SWT.DEFAULT); + Point buttonSize = getSize(); + size.x = Math.max(size.x, buttonSize.x); + size.y = Math.min(size.y, 300); + try { + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + String prefName = getDialogPreferencePrefix(); + int w = store.getInt(prefName + ".shell.w"); //$NON-NLS-1$ + int h = store.getInt(prefName + ".shell.h"); //$NON-NLS-1$ + size.x = Math.max(size.x, w); + size.y = Math.max(size.y, h); + } catch (Exception e) { + Activator.log(e); + } + popup.setSize(size); + } + + protected void saveShellSize() { + Point size = popup.getSize(); + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + String prefName = getDialogPreferencePrefix(); + store.setValue(prefName + ".shell.w", size.x); //$NON-NLS-1$ + store.setValue(prefName + ".shell.h", size.y); //$NON-NLS-1$ + } + + protected void initializeListViewer(LaunchBarListViewer listViewer) { + listViewer.setContentProvider(contentProvider); + listViewer.setLabelProvider(labelProvider); + listViewer.setComparator(sorter); + listViewer.setHistoryComparator(sorterTop); + } + + private void closePopup() { + getDisplay().asyncExec(() -> { + if (popup == null || popup.isDisposed()) { + return; + } + arrowTransition.to(arrowMax); + popup.setVisible(false); + popup.dispose(); + }); + } + + private Label createImage(Composite parent, Image image) { + Rectangle bounds = image.getBounds(); + boolean disposeImage = false; + if (bounds.height > 16 || bounds.width > 16) { + Image buttonImage = new Image(getDisplay(), 16, 16); + GC gc = new GC(buttonImage); + gc.setAntialias(SWT.ON); + gc.setInterpolation(SWT.HIGH); + gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, 16, 16); + gc.dispose(); + image = buttonImage; + disposeImage = true; + } + Label icon = new Label(parent, SWT.NONE); + icon.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true)); + icon.setImage(image); + if (disposeImage) { + final Image disposableImage = image; + icon.addDisposeListener(e -> disposableImage.dispose()); + } + return icon; + } + + private Label createLabel(Composite parent, Object element) { + Label label = new Label(parent, SWT.NONE); + label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true)); + label.setText(labelProvider.getText(element)); + label.setFont(getDisplay().getSystemFont()); + return label; + } + + public void setContentProvider(IStructuredContentProvider contentProvider) { + this.contentProvider = contentProvider; + } + + public IStructuredContentProvider getContentProvider() { + return contentProvider; + } + + public void setLabelProvider(ILabelProvider labelProvider) { + this.labelProvider = labelProvider; + } + + public ILabelProvider getLabelProvider() { + return labelProvider; + } + + @Override + public void setToolTipText(String toolTipText) { + super.setToolTipText(toolTipText); + if (buttonComposite != null) { + buttonComposite.setToolTipText(toolTipText); + } + if (currentLabel != null && !currentLabel.isDisposed()) { + currentLabel.setToolTipText(toolTipText); + } + if (currentIcon != null && !currentIcon.isDisposed()) { + currentIcon.setToolTipText(toolTipText); + } + } + + /** + * Set sorter for the bottom part of the selector + * + * @param sorter + */ + public void setSorter(Comparator sorter) { + this.sorter = sorter; + } + + /** + * Set sorter for the "history" part of the selector + * + * @param sorter + */ + public void setHistorySortComparator(Comparator sorter) { + this.sorterTop = sorter; + } + + public void setInput(Object input) { + this.input = input; + } + + public Object getInput() { + return input; + } + + public void refresh() { + PlatformUI.getWorkbench().getDisplay().asyncExec(() -> { + if (isDisposed()) + return; + update(selection); // update current selection - name or icon + // may have changed + if (popup != null && !popup.isDisposed()) { + listViewer.refresh(true); // update all labels in the popup + } + }); + } + + public void update(Object element) { + if (selection == element) { + if (currentIcon != null && !currentIcon.isDisposed()) { + currentIcon.setImage(labelProvider.getImage(element)); + } + if (currentLabel != null && !currentLabel.isDisposed()) { + currentLabel.setText(labelProvider.getText(element)); + } + } + if (popup != null && !popup.isDisposed()) { + listViewer.update(element, null); + } + } + + /** + * Returns the text currently visible in the selector + */ + public String getText() { + if (currentLabel != null) { + currentLabel.getText(); + } + return ""; //$NON-NLS-1$ + } + + protected boolean hasActionArea() { + return false; + } + + protected void createActionArea(Composite parent) { + // empty + } + + protected boolean isEditable(Object element) { + return false; + } + + protected void handleEdit(Object element) { + // nothing to do here + } + + public Color getOutlineColor() { + return getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW); + } + + public Color getHighlightColor() { + return getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION); + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ConfigSelector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ConfigSelector.java new file mode 100644 index 00000000000..cadeb5c55a9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ConfigSelector.java @@ -0,0 +1,232 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.window.Window; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.ui.DefaultDescriptorLabelProvider; +import org.eclipse.launchbar.ui.ILaunchBarUIManager; +import org.eclipse.launchbar.ui.NewLaunchConfigWizard; +import org.eclipse.launchbar.ui.NewLaunchConfigWizardDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseTrackAdapter; +import org.eclipse.swt.events.MouseTrackListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; + +public class ConfigSelector extends CSelector { + private ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + private ILaunchBarUIManager uiManager = Activator.getService(ILaunchBarUIManager.class); + private DefaultDescriptorLabelProvider defaultProvider; + + private static final String[] noConfigs = new String[] { Messages.ConfigSelector_0 }; + + public ConfigSelector(Composite parent, int style) { + super(parent, style); + setData(LaunchBarWidgetIds.ID, LaunchBarWidgetIds.CONFIG_SELECTOR); + + setToolTipText(Messages.ConfigSelector_1); + defaultProvider = new DefaultDescriptorLabelProvider(); + + setContentProvider(new IStructuredContentProvider() { + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + @Override + public void dispose() { + } + + @Override + public Object[] getElements(Object inputElement) { + try { + ILaunchDescriptor[] descs = manager.getLaunchDescriptors(); + if (descs.length == 0) + return noConfigs; + return descs; + } catch (CoreException e) { + return noConfigs; + } + } + }); + + setLabelProvider(new LabelProvider() { + @Override + public Image getImage(Object element) { + if (element instanceof ILaunchDescriptor) { + try { + ILaunchDescriptor configDesc = (ILaunchDescriptor) element; + ILabelProvider labelProvider = uiManager.getLabelProvider(configDesc); + if (labelProvider != null) { + Image img = labelProvider.getImage(element); + if (img != null) + return img; + } + } catch (CoreException e) { + Activator.log(e); + } + } + return defaultProvider.getImage(element); + } + + @Override + public String getText(Object element) { + if (element instanceof String) { + return (String) element; + } else if (element instanceof ILaunchDescriptor) { + try { + ILaunchDescriptor configDesc = (ILaunchDescriptor) element; + ILabelProvider labelProvider = uiManager.getLabelProvider(configDesc); + if (labelProvider != null) { + String text = labelProvider.getText(element); + if (text != null) + return text; + } + } catch (CoreException e) { + Activator.log(e); + } + } + return defaultProvider.getText(element); + } + }); + // no sorter for top, data is sorted by provider in historical order + setHistorySortComparator(null); + // alphabetic sorter + setSorter((ILaunchDescriptor o1, ILaunchDescriptor o2) -> o1.getName().compareTo(o2.getName())); + + } + + @Override + protected void initializeListViewer(LaunchBarListViewer listViewer) { + listViewer.setHistorySupported(true); + listViewer.setHistoryPreferenceName(Activator.PREF_LAUNCH_HISTORY_SIZE); + super.initializeListViewer(listViewer); + } + + @Override + protected void fireSelectionChanged() { + Object selected = getSelection(); + if (selected instanceof ILaunchDescriptor) { + ILaunchDescriptor configDesc = (ILaunchDescriptor) selected; + try { + manager.setActiveLaunchDescriptor(configDesc); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + @Override + public boolean isEditable(Object element) { + return element instanceof ILaunchDescriptor; + } + + @Override + public void handleEdit(Object element) { + uiManager.openConfigurationEditor((ILaunchDescriptor) element); + } + + @Override + public boolean hasActionArea() { + return true; + } + + @Override + public void createActionArea(Composite parent) { + final Composite createButton = new Composite(parent, SWT.BORDER); + createButton.setData(LaunchBarWidgetIds.ID, LaunchBarWidgetIds.NEW); + GridDataFactory.fillDefaults().grab(true, false).applyTo(createButton); + GridLayoutFactory.fillDefaults().margins(7, 7).applyTo(createButton); + createButton.setBackground(getBackground()); + + final Label createLabel = new Label(createButton, SWT.NONE); + GridDataFactory.fillDefaults().grab(true, false).applyTo(createLabel); + createLabel.setBackground(getBackground()); + createLabel.setText(Messages.ConfigSelector_2); + + MouseListener mouseListener = new MouseAdapter() { + @Override + public void mouseUp(org.eclipse.swt.events.MouseEvent e) { + final NewLaunchConfigWizard wizard = new NewLaunchConfigWizard(); + WizardDialog dialog = new NewLaunchConfigWizardDialog(getShell(), wizard); + if (dialog.open() == Window.OK) { + new Job(Messages.ConfigSelector_3) { + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + wizard.getWorkingCopy().doSave(); + return Status.OK_STATUS; + } catch (CoreException e) { + return e.getStatus(); + } + } + }.schedule(); + } + } + }; + + createButton.addMouseListener(mouseListener); + createLabel.addMouseListener(mouseListener); + + MouseTrackListener mouseTrackListener = new MouseTrackAdapter() { + @Override + public void mouseEnter(MouseEvent e) { + Color highlightColor = getHighlightColor(); + createButton.setBackground(highlightColor); + createLabel.setBackground(highlightColor); + } + + @Override + public void mouseExit(MouseEvent e) { + Color backgroundColor = getBackground(); + createButton.setBackground(backgroundColor); + createLabel.setBackground(backgroundColor); + } + }; + createButton.addMouseTrackListener(mouseTrackListener); + createLabel.addMouseTrackListener(mouseTrackListener); + } + + @Override + public Point computeSize(int wHint, int hHint, boolean changed) { + return super.computeSize(250, hHint, changed); + } + + @Override + public void setSelection(Object element) { + if (element == null) + element = noConfigs[0]; + super.setSelection(element); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/EditButton.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/EditButton.java new file mode 100644 index 00000000000..c05a31a4781 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/EditButton.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.swt.widgets.Composite; + +public class EditButton extends CButton { + + public EditButton(Composite parent, int style) { + super(parent, style); + setHotImage(Activator.getDefault().getImageRegistry().get(Activator.IMG_CONFIG_CONFIG)); + setColdImage(Activator.getDefault().getImageRegistry().get(Activator.IMG_EDIT_COLD)); + setToolTipText(Messages.EditButton_0); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/FilterControl.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/FilterControl.java new file mode 100644 index 00000000000..140a9b9ce67 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/FilterControl.java @@ -0,0 +1,460 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.osgi.util.NLS; +import org.eclipse.swt.SWT; +import org.eclipse.swt.accessibility.AccessibleAdapter; +import org.eclipse.swt.accessibility.AccessibleEvent; +import org.eclipse.swt.events.FocusAdapter; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.progress.WorkbenchJob; + +/** + * A simple control that provides a text widget and controls a list viewer + */ +public class FilterControl extends Composite { + /** + * The filter text widget to be used by this tree. This value may be null if there is no filter widget, or if the + * controls have not yet been created. + */ + protected Text filterText; + /** + * The viewer for the filtered tree. This value should never be null after the widget creation methods are + * complete. + */ + protected LaunchBarListViewer listViewer; + + protected ViewerFilter patternFilter; + /** + * The text to initially show in the filter text control. + */ + protected String initialText = ""; //$NON-NLS-1$ + protected String patternText = null; + /** + * The job used to refresh the tree. + */ + private Job refreshJob; + /** + * The parent composite this control. + */ + protected Composite parent; + + /** + * Creates a filter control, to be fully function attachListViewer must be called shortly after + * + * @param parent + */ + public FilterControl(Composite parent) { + super(parent, SWT.NONE); + this.parent = parent; + patternFilter = new ViewerFilter() { + @Override + public boolean select(Viewer viewer, Object parentElement, Object element) { + String text = ((ILabelProvider) listViewer.getLabelProvider()).getText(element); + if (patternText == null) + return true; + String trim = patternText.trim(); + if (trim.isEmpty()) + return true; + if (text == null) + return false; + if (text.contains(trim)) + return true; + if (text.toLowerCase().contains(trim.toLowerCase())) + return true; + return false; + } + }; + init(); + } + + /** + * Create the filtered list. + */ + protected void init() { + createControl(this, SWT.NONE); + createRefreshJob(); + setInitialText(Messages.FilterControl_0); + setFont(parent.getFont()); + } + + /** + * Create the filtered tree's controls. Subclasses should override. + * + * @param parent + * @param treeStyle + */ + protected void createControl(Composite parent, int treeStyle) { + setLayout(GridLayoutFactory.fillDefaults().spacing(0, 0).create()); + if (parent.getLayout() instanceof GridLayout) { + setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); + } + Composite fc = createFilterControls(parent); + fc.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); + } + + /** + * Create the filter controls. By default, a text and corresponding tool bar button that clears the contents of the text is + * created. Subclasses may override. + * + * @param parent + * parent Composite of the filter controls + * @return the Composite that contains the filter controls + */ + protected Composite createFilterControls(Composite parent) { + createFilterText(parent); + return parent; + } + + public Control attachListViewer(LaunchBarListViewer listViewer) { + this.listViewer = listViewer; + // listViewer.getControl().setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create()); + listViewer.getControl().addDisposeListener(e -> refreshJob.cancel()); + listViewer.addFilter(patternFilter); + return listViewer.getControl(); + } + + /** + * Create the refresh job for the receiver. + * + */ + private void createRefreshJob() { + refreshJob = doCreateRefreshJob(); + refreshJob.setSystem(true); + } + + @Override + public void setVisible(boolean visible) { + boolean oldVisible = getVisible(); + if (oldVisible == true && visible == false && listViewer != null && filterText.isFocusControl()) { + listViewer.setFocus(); + } + if (getLayoutData() instanceof GridData) { + ((GridData) getLayoutData()).heightHint = visible ? SWT.DEFAULT : 0; + } + super.setVisible(visible); + } + + /** + * Creates a workbench job that will refresh the tree based on the current filter text. Subclasses may override. + * + * @return a workbench job that can be scheduled to refresh the tree + * + * @since 3.4 + */ + protected WorkbenchJob doCreateRefreshJob() { + return new WorkbenchJob("Refresh Filter") {//$NON-NLS-1$ + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + if (listViewer == null) + return Status.CANCEL_STATUS; + if (listViewer.getControl().isDisposed()) { + return Status.CANCEL_STATUS; + } + updatePatternText(); + if (patternText == null) { + return Status.OK_STATUS; + } + Control redrawControl = listViewer.getControl(); + try { + // don't want the user to see updates that will be made to + // the tree + // we are setting redraw(false) on the composite to avoid + // dancing scrollbar + redrawControl.setRedraw(false); + listViewer.setHistorySupported(patternText == null || patternText.isEmpty()); + listViewer.refresh(true); + updateListSelection(false); + // re-focus filterText in case it lost the focus + filterText.setFocus(); + } finally { + redrawControl.setRedraw(true); + } + return Status.OK_STATUS; + } + }; + } + + /** + * Creates the filter text and adds listeners. This method calls {@link #doCreateFilterText(Composite)} to create the text + * control. Subclasses should override {@link #doCreateFilterText(Composite)} instead of overriding this method. + * + * @param parent + * Composite of the filter text + */ + protected void createFilterText(Composite parent) { + filterText = doCreateFilterText(parent); + filterText.getAccessible().addAccessibleListener(new AccessibleAdapter() { + @Override + public void getName(AccessibleEvent e) { + String filterTextString = filterText.getText(); + if (filterTextString.length() == 0 || filterTextString.equals(initialText)) { + e.result = initialText; + } else { + e.result = NLS.bind(Messages.FilterControl_1, + new String[] { filterTextString, String.valueOf(getFilteredItemsCount()) }); + } + } + + /** + * Return the number of filtered items + * + * @return int + */ + private int getFilteredItemsCount() { + return listViewer.getItemCount(); + } + }); + filterText.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + } + + @Override + public void focusLost(FocusEvent e) { + if (filterText.getText().equals(initialText)) { + setFilterText(""); //$NON-NLS-1$ + } + } + }); + filterText.addMouseListener(new MouseAdapter() { + @Override + public void mouseDown(MouseEvent e) { + if (filterText.getText().equals(initialText)) { + clearText(); + } + } + }); + // enter key set focus to tree + filterText.addTraverseListener(e -> { + if (e.detail == SWT.TRAVERSE_RETURN) { + e.doit = false; + listViewer.setFocus(); + updateListSelection(true); + } else if (e.detail == SWT.TRAVERSE_ARROW_NEXT) { + listViewer.setFocus(); + updateListSelection(false); + } else if (e.detail == SWT.TRAVERSE_ESCAPE) { + listViewer.setDefaultSelection(new StructuredSelection()); + e.doit = false; + } + }); + filterText.addModifyListener(e -> textChanged()); + // if we're using a field with built in cancel we need to listen for + // default selection changes (which tell us the cancel button has been + // pressed) + if ((filterText.getStyle() & SWT.ICON_CANCEL) != 0) { + filterText.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetDefaultSelected(SelectionEvent e) { + if (e.detail == SWT.ICON_CANCEL) + clearText(); + } + }); + } + filterText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); + } + + protected void updateListSelection(boolean enter) { + if (listViewer.getItemCount() == 0) { + if (enter) + Display.getCurrent().beep(); + } else { + StructuredSelection sel; + // if the initial filter text hasn't changed, do not try to match + if (patternText != null && !patternText.trim().isEmpty()) { + // select item with triggering event, it may close the popup if list used as combo + sel = new StructuredSelection(listViewer.getTopFilteredElement()); + } else { + sel = new StructuredSelection(listViewer.getTopElement()); + } + if (enter) + listViewer.setDefaultSelection(sel); + else + listViewer.setSelection(sel); + } + } + + protected Text doCreateFilterText(Composite parent) { + return new Text(parent, SWT.SINGLE | SWT.BORDER | SWT.SEARCH | SWT.ICON_CANCEL); + } + + /** + * Update the receiver after the text has changed. + */ + protected void textChanged() { + String old = patternText; + updatePatternText(); + if (patternText != null && old == null && patternText.isEmpty()) + return;// we changing from initial selection to empty string + if (patternText == old) + return; + // cancel currently running job first, to prevent unnecessary redraw + refreshJob.cancel(); + refreshJob.schedule(getRefreshJobDelay()); + } + + /** + * Return the time delay that should be used when scheduling the filter refresh job. Subclasses may override. + * + * @return a time delay in milliseconds before the job should run + * + */ + protected long getRefreshJobDelay() { + return 200; + } + + /** + * Set the background for the widgets that support the filter text area. + * + * @param background + * background Color to set + */ + @Override + public void setBackground(Color background) { + super.setBackground(background); + // listComposite.setBackground(background); + // filterText.setBackground(background); + } + + /** + * Clears the text in the filter text widget. + */ + protected void clearText() { + setFilterText(""); //$NON-NLS-1$ + // textChanged(); + } + + /** + * Set the text in the filter control. + * + * @param string + */ + protected void setFilterText(String string) { + if (filterText != null) { + filterText.setText(string); + selectAll(); + } + } + + public Text getFilterText() { + return filterText; + } + + /** + * Get the tree viewer of the receiver. + * + * @return the tree viewer + */ + public LaunchBarListViewer getViewer() { + return listViewer; + } + + /** + * Get the filter text for the receiver, if it was created. Otherwise return null. + * + * @return the filter Text, or null if it was not created + */ + public Text getFilterControl() { + return filterText; + } + + /** + * Convenience method to return the text of the filter control. If the text widget is not created, then null is returned. + * + * @return String in the text, or null if the text does not exist + */ + protected String getFilterString() { + return filterText != null ? filterText.getText() : null; + } + + /** + * Set the text that will be shown until the first focus. A default value is provided, so this method only need be called if + * overriding the default initial text is desired. + * + * @param text + * initial text to appear in text field + */ + public void setInitialText(String text) { + initialText = text; + if (filterText != null) { + filterText.setMessage(text); + if (filterText.isFocusControl()) { + setFilterText(initialText); + textChanged(); + } else { + getDisplay().asyncExec(() -> { + if (!filterText.isDisposed() && filterText.isFocusControl()) { + setFilterText(initialText); + textChanged(); + } + }); + } + } else { + setFilterText(initialText); + textChanged(); + } + } + + /** + * Select all text in the filter text field. + * + */ + protected void selectAll() { + if (filterText != null) { + filterText.selectAll(); + } + } + + /** + * Get the initial text for the receiver. + * + * @return String + */ + protected String getInitialText() { + return initialText; + } + + private void updatePatternText() { + String text = getFilterString(); + boolean initial = initialText != null && initialText.equals(text); + if (initial) { + patternText = null; + } else if (text != null) { + patternText = text; + } + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarButtonImageDescriptor.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarButtonImageDescriptor.java new file mode 100644 index 00000000000..80047ba9a0d --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarButtonImageDescriptor.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer - initial API and implementation + * Elena Laskavaia - moved to a separate class + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.jface.resource.CompositeImageDescriptor; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; + +/** + * This class will take two images and create descriptor that will overlay them, mainImage will be centered + */ +public class LaunchBarButtonImageDescriptor extends CompositeImageDescriptor { + private Image bgImage; + private Image mainImage; + + /** + * @param mainImage - main image, will be centered + * @param bgImage - background image + */ + public LaunchBarButtonImageDescriptor(Image mainImage, Image bgImage) { + super(); + this.bgImage = bgImage; + this.mainImage = mainImage; + } + + @Override + protected Point getSize() { + Rectangle bounds = bgImage.getBounds(); + return new Point(bounds.width - bounds.y, bounds.height - bounds.x); + } + + @Override + protected void drawCompositeImage(int width, int height) { + drawImage(bgImage.getImageData(), 0, 0); + Rectangle bgBounds = bgImage.getBounds(); + Rectangle modeBounds = mainImage.getBounds(); + int x = ((bgBounds.width - bgBounds.x) - (modeBounds.width - modeBounds.x)) / 2; + int y = ((bgBounds.height - bgBounds.y) - (modeBounds.height - modeBounds.y)) / 2; + drawImage(mainImage.getImageData(), x, y); + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java new file mode 100644 index 00000000000..90d31b71a62 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarControl.java @@ -0,0 +1,250 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import javax.annotation.PostConstruct; +import javax.annotation.PreDestroy; + +import org.eclipse.core.commands.Command; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.launchbar.core.ILaunchBarListener; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.ui.ILaunchBarUIConstants; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.ToolItem; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.commands.ICommandService; +import org.eclipse.ui.handlers.IHandlerService; + +public class LaunchBarControl implements ILaunchBarListener { + public static final String ID = "org.eclipse.launchbar"; //$NON-NLS-1$ + public static final String CLASS_URI = "bundleclass://" + Activator.PLUGIN_ID + "/" //$NON-NLS-1$ //$NON-NLS-2$ + + LaunchBarControl.class.getName(); + + private ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + + private Composite container; + private ConfigSelector configSelector; + private ModeSelector modeSelector; + private Label onLabel; + private TargetSelector targetSelector; + + private static final int SELECTION_DELAY = 200; + + @PostConstruct + public void createControl(Composite parent) { + manager.addListener(this); + + container = new Composite(parent, SWT.NONE); + container.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + GridLayout layout = new GridLayout(5, false); + layout.marginHeight = 2; + layout.marginWidth = 2; + container.setLayout(layout); + container.addDisposeListener(e -> LaunchBarControl.this.dispose()); + + ToolBar toolBar = new ToolBar(container, SWT.FLAT); + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + boolean buildEnabled = store.getBoolean(Activator.PREF_ENABLE_BUILDBUTTON); + if (buildEnabled) { + createButton(toolBar, Activator.IMG_BUTTON_BUILD, Messages.LaunchBarControl_Build, + ILaunchBarUIConstants.CMD_BUILD); + } + + createButton(toolBar, Activator.IMG_BUTTON_LAUNCH, Messages.LaunchBarControl_Launch, + ILaunchBarUIConstants.CMD_LAUNCH); + createButton(toolBar, Activator.IMG_BUTTON_STOP, Messages.LaunchBarControl_Stop, + ILaunchBarUIConstants.CMD_STOP); + + modeSelector = new ModeSelector(container, SWT.NONE); + modeSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + modeSelector.setInput(manager); + + configSelector = new ConfigSelector(container, SWT.NONE); + configSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + configSelector.setInput(manager); + + boolean supportsTargets; + try { + supportsTargets = supportsTargets(manager.getActiveLaunchDescriptor()); + } catch (CoreException e) { + Activator.log(e); + supportsTargets = true; + } + + if (supportsTargets) { + createTargetSelector(); + } + + syncSelectors(); + } + + private void createTargetSelector() { + if (container.isDisposed()) { + return; + } + + onLabel = new Label(container, SWT.NONE); + onLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + onLabel.setText(Messages.LaunchBarControl_0 + ":"); //$NON-NLS-1$ + + targetSelector = new TargetSelector(container, SWT.NONE); + targetSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false)); + targetSelector.setInput(manager); + } + + protected void syncSelectors() { + try { + if (configSelector != null) + configSelector.setSelection(manager.getActiveLaunchDescriptor()); + if (modeSelector != null) + modeSelector.setSelection(manager.getActiveLaunchMode()); + if (targetSelector != null) + targetSelector.setSelection(manager.getActiveLaunchTarget()); + } catch (CoreException e) { + Activator.log(e); + } + } + + @PreDestroy + public void dispose() { + manager.removeListener(this); + } + + private ToolItem createButton(Composite parent, String imageName, String toolTipText, final String commandId) { + ToolItem button = new ToolItem((ToolBar) parent, SWT.FLAT); + + Image bgImage = Activator.getDefault().getImageRegistry().get(Activator.IMG_BUTTON_BACKGROUND); + Image fgImage = Activator.getDefault().getImageRegistry().get(imageName); + + ImageDescriptor imageDesc = new LaunchBarButtonImageDescriptor(fgImage, bgImage); + Image image = imageDesc.createImage(); + button.setImage(image); + button.setToolTipText(toolTipText); + button.setData("command", commandId); //$NON-NLS-1$ + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) { + final ICommandService commandService = PlatformUI.getWorkbench().getService(ICommandService.class); + Command command = commandService.getCommand(commandId); + final Event trigger = new Event(); + final IHandlerService handlerService = PlatformUI.getWorkbench().getService(IHandlerService.class); + ExecutionEvent executionEvent = handlerService.createExecutionEvent(command, trigger); + try { + command.executeWithChecks(executionEvent); + } catch (OperationCanceledException ex) { + // abort + } catch (Exception ex) { + Activator.log(ex); + } + } + }); + button.addDisposeListener(e -> image.dispose()); + return button; + } + + @Override + public void activeLaunchDescriptorChanged(ILaunchDescriptor descriptor) { + if (container == null || container.isDisposed()) { + return; + } + + container.getDisplay().asyncExec(() -> { + if (configSelector != null) { + configSelector.setDelayedSelection(descriptor, SELECTION_DELAY); + } + + if (supportsTargets(descriptor)) { + if (targetSelector == null || targetSelector.isDisposed()) { + createTargetSelector(); + syncSelectors(); + if (!container.isDisposed()) { + Composite parent = container.getParent(); + parent.layout(true); + } + } + } else { + if (targetSelector != null && !targetSelector.isDisposed()) { + onLabel.dispose(); + targetSelector.dispose(); + if (!container.isDisposed()) { + Composite parent = container.getParent(); + parent.layout(true); + } + } + } + }); + } + + private boolean supportsTargets(ILaunchDescriptor descriptor) { + if (descriptor == null) { + return true; + } + + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + if (store.getBoolean(Activator.PREF_ALWAYS_TARGETSELECTOR)) { + return true; + } + + try { + return descriptor.getType().supportsTargets(); + } catch (CoreException e) { + Activator.log(e); + return true; + } + } + + @Override + public void activeLaunchModeChanged(ILaunchMode mode) { + if (modeSelector != null) { + modeSelector.setDelayedSelection(mode, SELECTION_DELAY); + } + } + + @Override + public void activeLaunchTargetChanged(ILaunchTarget target) { + if (targetSelector != null) { + targetSelector.setDelayedSelection(target, SELECTION_DELAY); + } + } + + @Override + public void launchTargetsChanged() { + if (targetSelector != null) { + targetSelector.refresh(); + } + } + + public ConfigSelector getConfigSelector() { + return configSelector; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarInjector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarInjector.java new file mode 100644 index 00000000000..a2a1d278578 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarInjector.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import javax.inject.Inject; + +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.e4.core.services.events.IEventBroker; +import org.eclipse.e4.ui.model.application.MApplication; +import org.eclipse.e4.ui.model.application.ui.SideValue; +import org.eclipse.e4.ui.model.application.ui.basic.MTrimBar; +import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement; +import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow; +import org.eclipse.e4.ui.model.application.ui.basic.MWindow; +import org.eclipse.e4.ui.model.application.ui.menu.MMenuFactory; +import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; +import org.eclipse.e4.ui.workbench.UIEvents; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.swt.widgets.Widget; + +public class LaunchBarInjector { + + @Inject + MApplication application; + + @Inject + IEventBroker eventBroker; + + @Execute + void execute() { + if (application == null) { + // We are running headless, don't need the launch bar here. + return; + } + + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + boolean enabled = store.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); + injectIntoAll(enabled); + + // Watch for new trimmed windows and inject there too. + eventBroker.subscribe(UIEvents.TrimmedWindow.TOPIC_TRIMBARS, event -> { + if (!UIEvents.isADD(event)) + return; + Object newValue = event.getProperty(UIEvents.EventTags.NEW_VALUE); + if (newValue instanceof MTrimBar) { + MTrimBar trimBar = (MTrimBar) newValue; + if (trimBar.getSide() == SideValue.TOP) { + IPreferenceStore store1 = Activator.getDefault().getPreferenceStore(); + boolean enabled1 = store1.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); + injectLaunchBar(trimBar, enabled1); + } + } + }); + + // Watch for preference changes + Activator.getDefault().getPreferenceStore().addPropertyChangeListener(event -> { + if (event.getProperty().equals(Activator.PREF_ENABLE_LAUNCHBAR)) { + boolean enabled1 = Boolean.parseBoolean(event.getNewValue().toString()); + injectIntoAll(enabled1); + } + if (event.getProperty().equals(Activator.PREF_ALWAYS_TARGETSELECTOR) + || event.getProperty().equals(Activator.PREF_ENABLE_BUILDBUTTON)) { + IPreferenceStore store1 = Activator.getDefault().getPreferenceStore(); + boolean enabled2 = store1.getBoolean(Activator.PREF_ENABLE_LAUNCHBAR); + if (enabled2) { + injectIntoAll(false); + injectIntoAll(true); + } + } + }); + } + + private void injectIntoAll(boolean enabled) { + // Inject the toolbar into all top trims + for (MWindow window : application.getChildren()) { + if (window instanceof MTrimmedWindow) { + for (MTrimBar trimBar : ((MTrimmedWindow) window).getTrimBars()) { + if (trimBar.getSide() == SideValue.TOP) { + injectLaunchBar(trimBar, enabled); + } + } + } + } + } + + private void injectLaunchBar(MTrimBar trimBar, boolean enabled) { + // are we enabled or not + // and fix up the class URI for 2.0 + + // Search for control in trimbar + MToolControl launchBarElement = null; + for (MTrimElement trimElement : trimBar.getChildren()) { + if (LaunchBarControl.ID.equals(trimElement.getElementId())) { + launchBarElement = (MToolControl) trimElement; + break; + } + } + + if (launchBarElement != null) { + // Fix up class name + if (!LaunchBarControl.CLASS_URI.equals(launchBarElement.getContributionURI())) { + launchBarElement.setContributionURI(LaunchBarControl.CLASS_URI); + } + + // remove it if we're disabled + if (!enabled) { + trimBar.getChildren().remove(launchBarElement); + // This seems to be a bug in the platform but for now, dispose of the widget + Widget widget = (Widget) launchBarElement.getWidget(); + widget.dispose(); + } + // either way, we're done + return; + } + + if (enabled) { + // Add it + MToolControl launchBar = MMenuFactory.INSTANCE.createToolControl(); + launchBar.setElementId(LaunchBarControl.ID); + launchBar.setContributionURI(LaunchBarControl.CLASS_URI); + trimBar.getChildren().add(0, launchBar); + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarListViewer.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarListViewer.java new file mode 100644 index 00000000000..e73b76d516c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarListViewer.java @@ -0,0 +1,641 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.viewers.IFontProvider; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.StructuredViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerComparator; +import org.eclipse.jface.viewers.ViewerFilter; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseTrackAdapter; +import org.eclipse.swt.events.MouseTrackListener; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.events.TraverseListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Sash; +import org.eclipse.swt.widgets.Widget; + +public class LaunchBarListViewer extends StructuredViewer { + private ScrolledComposite listScrolled; + private Composite listComposite; + private ListItem[] listItems; + private int selIndex; + private int itemH = 30; + private int scrollBucket; + private final int maxScrollBucket = 6; + private int separatorIndex = -1; + private boolean historySupported = true; + private ViewerComparator historyComparator; + private boolean finalSelection = false; + private FilterControl filterControl; + private Sash sash; + private String historyPref; + + private static class LaunchBarListViewerComparator extends ViewerComparator { + public LaunchBarListViewerComparator(Comparator comp) { + super(comp); + } + + // have to override it because standard ViewerComparator compares by labels only + @SuppressWarnings("unchecked") + @Override + public int compare(Viewer viewer, Object e1, Object e2) { + return ((Comparator) getComparator()).compare(e1, e2); + } + } + + private TraverseListener listItemTraverseListener = e -> { + final ListItem currItem = selIndex >= 0 ? listItems[selIndex] : null; + if (currItem == null && e.keyCode != SWT.ARROW_DOWN) { + return; + } + if (e.detail == SWT.TRAVERSE_ARROW_NEXT || e.detail == SWT.TRAVERSE_TAB_NEXT) { + if (e.keyCode == SWT.ARROW_DOWN) { + int maxIdx = listItems.length - 1; + if (selIndex < maxIdx) { + // move to next item + listItems[selIndex + 1].setSelected(true); + if (scrollBucket < maxScrollBucket) { + scrollBucket++; + } else { + // need to scroll the list up 1 item + int sY1 = listScrolled.getOrigin().y; + listScrolled.setOrigin(0, sY1 + itemH); + } + } else if (selIndex == maxIdx && maxIdx > maxScrollBucket) { + // level the scroll for any offset at the bottom of the list + listScrolled.setOrigin(0, itemH * (maxIdx - maxScrollBucket + 1)); + } + } + } else if (e.detail == SWT.TRAVERSE_ARROW_PREVIOUS || e.detail == SWT.TRAVERSE_TAB_PREVIOUS) { + if (e.keyCode == SWT.ARROW_UP) { + if (selIndex > 0) { + // move to previous item + if (scrollBucket > 0) { + scrollBucket--; + } else { + // need to scroll the list down 1 item + int sY2 = listScrolled.getOrigin().y; + listScrolled.setOrigin(0, sY2 - itemH); + } + listItems[selIndex - 1].setSelected(true); + } else if (selIndex == 0) { + // level any offset @ beginning + listScrolled.setOrigin(0, 0); + } + } else if (currItem.editButton != null) { + // remove focus from edit button + currItem.editButton.setSelected(false); + currItem.editButton.redraw(); + } + } else if (e.detail == SWT.TRAVERSE_RETURN) { + setDefaultSelection(new StructuredSelection(currItem.element)); + } else if (e.detail == SWT.TRAVERSE_ESCAPE) { + setDefaultSelection(new StructuredSelection()); + } + }; + + private KeyListener lisItemKeyListener = new KeyListener() { + @Override + public void keyReleased(KeyEvent e) { + // ignore + } + + @Override + public void keyPressed(KeyEvent e) { + if (e.character != 0 && e.character >= 0x20 && !filterControl.isVisible()) { + if (listItems.length <= 1) + return; // no filter for 1 item! + // enable filter control and send the character there + filterControl.setVisible(true); + filterControl.setFocus(); + filterControl.getParent().layout(true); + filterControl.getFilterText().setText(e.character + ""); //$NON-NLS-1$ + filterControl.getFilterText().setSelection(1); + } else if (e.character == SWT.ESC) { + setDefaultSelection(new StructuredSelection()); + } + } + }; + + private class ListItem extends Composite { + protected final Object element; + private Label icon; + private Label label; + protected EditButton editButton; + private int index; + private ILabelProvider labelProvider; + + @Override + public String toString() { + return "[" + index + "] " + labelProvider.getText(element); //$NON-NLS-1$ //$NON-NLS-2$ + } + + public ListItem(Composite parent, int style, Object element, int index, ILabelProvider labelProvider) { + super(parent, style); + this.element = element; + this.index = index; + this.labelProvider = labelProvider; + setData(element); + setBackground(parent.getBackground()); + addPaintListener(new PaintListener() { + @Override + public void paintControl(PaintEvent e) { + removePaintListener(this); + if (label == null) { + lazyInit(); + } + } + }); + } // end ListItem(..) + + protected void lazyInit() { + Image image = labelProvider.getImage(element); + int columns = 1; + if (image != null) + columns++; + GridLayout layout = new GridLayout(columns, false); + layout.marginWidth = layout.marginHeight = 7; + setLayout(layout); + MouseListener listItemMouseListener = new MouseAdapter() { + @Override + public void mouseUp(MouseEvent e) { + setDefaultSelection(new StructuredSelection(element)); + } + }; + MouseTrackListener listItemMouseTrackListener = new MouseTrackAdapter() { + @Override + public void mouseEnter(MouseEvent e) { + setSelected(true); + } + + @Override + public void mouseExit(MouseEvent e) { + setSelected(false); + } + }; + addMouseListener(listItemMouseListener); + addMouseTrackListener(listItemMouseTrackListener); + if (image != null) { + icon = createImage(this, image); + icon.addMouseListener(listItemMouseListener); + icon.addMouseTrackListener(listItemMouseTrackListener); + } + label = createLabel(this, element); + label.addMouseListener(listItemMouseListener); + label.addMouseTrackListener(listItemMouseTrackListener); + // add traverse listnener to control which will have keyboard focus + addTraverseListener(listItemTraverseListener); + addKeyListener(lisItemKeyListener); + + layout(true); + } + + public void setSelected(boolean selected) { + if (selected) { + setBackground(getDisplay().getSystemColor(SWT.COLOR_LIST_SELECTION)); + int idx = getIndex(); + if (idx != selIndex) { + if (selIndex >= 0) { + listItems[selIndex].setBackground(getParent().getBackground()); + scrollBucket = Math.max(Math.min(scrollBucket + idx - selIndex, maxScrollBucket), 0); + } else { // initially + scrollBucket = Math.min(idx, maxScrollBucket); + } + } + selIndex = idx; + } else { + setBackground(getParent().getBackground()); + } + if (editButton != null) { + editButton.setSelected(selected); + } + } + + @Override + public void setBackground(Color color) { + super.setBackground(color); + if (icon != null && !icon.isDisposed()) + icon.setBackground(color); + if (label != null && !label.isDisposed()) + label.setBackground(color); + if (editButton != null && !editButton.isDisposed()) + editButton.setBackground(color); + } + + public void setImage(Image image) { + if (icon != null && !icon.isDisposed()) + icon.setImage(image); + } + + public void setText(String text) { + if (!label.isDisposed()) + label.setText(text); + } + + @Override + public boolean setFocus() { + super.setFocus(); + return true; + } + + protected int getIndex() { + return index; + } + + private Label createImage(Composite parent, Image image) { + Rectangle bounds = image.getBounds(); + boolean disposeImage = false; + if (bounds.height > 16 || bounds.width > 16) { + Image buttonImage = new Image(getDisplay(), 16, 16); + GC gc = new GC(buttonImage); + gc.setAntialias(SWT.ON); + gc.setInterpolation(SWT.HIGH); + // resize to 16 pixels + gc.drawImage(image, 0, 0, image.getBounds().width, image.getBounds().height, 0, 0, 16, 16); + gc.dispose(); + image = buttonImage; + disposeImage = true; + } + Label icon = new Label(parent, SWT.NONE); + icon.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, true)); + icon.setImage(image); + if (disposeImage) { + final Image disposableImage = image; + icon.addDisposeListener(e -> disposableImage.dispose()); + } + icon.setBackground(parent.getBackground()); + return icon; + } + + private Label createLabel(Composite parent, Object element) { + Label label = new Label(parent, SWT.NONE); + label.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, true)); + ILabelProvider labelProvider = (ILabelProvider) getLabelProvider(); + label.setText(labelProvider.getText(element)); + if (labelProvider instanceof IFontProvider) { + label.setFont(((IFontProvider) labelProvider).getFont(element)); + } + label.setBackground(parent.getBackground()); + return label; + } + } // end ListItem class + + public LaunchBarListViewer(Composite parent) { + filterControl = new FilterControl(parent); + filterControl.setBackground(parent.getBackground()); + listScrolled = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.NO_BACKGROUND); + listScrolled.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + listScrolled.setExpandHorizontal(true); + listScrolled.setBackground(parent.getBackground()); + listComposite = new Composite(listScrolled, SWT.NONE); + listComposite.setBackground(parent.getBackground()); + listScrolled.setContent(listComposite); + listComposite.setLayout(GridLayoutFactory.fillDefaults().spacing(0, 0).create()); + selIndex = -1; + scrollBucket = 0; + filterControl.attachListViewer(this); + historySupported = false; + setHistoryPreferenceName(getHistoryPreferenceName()); + } + + private void createSash(final Composite listComp) { + if (separatorIndex < 0 || !historySupported) + return; + sash = new Sash(listComp, SWT.BORDER | SWT.HORIZONTAL); + sash.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + if (separatorIndex < listItems.length) + sash.moveAbove(listItems[separatorIndex]); + else + sash.moveBelow(null); + + sash.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_SELECTION)); + sash.addListener(SWT.Selection, e -> separatorIndex = (e.y + itemH / 2) / itemH); + sash.addMouseListener(new MouseListener() { + @Override + public void mouseUp(MouseEvent e) { + setSeparatorIndex(separatorIndex); // call setter if it was overriden + if (separatorIndex >= 0) { + if (separatorIndex < listItems.length) + sash.moveAbove(listItems[separatorIndex]); + else + sash.moveBelow(null); + listComp.layout(); + } + } + + @Override + public void mouseDown(MouseEvent e) { + if (!Platform.getOS().equals(Platform.OS_MACOSX)) { // does not work on mac + sash.moveAbove(null); // keep on top so user see it when moving + } + } + + @Override + public void mouseDoubleClick(MouseEvent e) { + // ignore + } + + }); + sash.setToolTipText(Messages.LaunchBarListViewer_0); + } + + @Override + public Control getControl() { + return listScrolled; + } + + @Override + protected void inputChanged(Object input, Object oldInput) { + super.inputChanged(input, oldInput); + refreshAll(); + } + + protected void refreshAll() { + selIndex = -1; + Control[] children = listComposite.getChildren(); + for (Control control : children) { + control.dispose(); + } + Object[] origElements = getElements(); + Object[] elements = filterElements(origElements); + listItems = new ListItem[elements.length]; + if (elements.length > 0) { + listItems[0] = createListItem(elements, 0); + itemH = Math.max(listItems[0].computeSize(SWT.DEFAULT, SWT.DEFAULT).y, 16); + for (int i = 1; i < elements.length; ++i) { + listItems[i] = createListItem(elements, i); + } + createSash(listComposite); + } + listComposite.pack(true); + listComposite.layout(true, true); + GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); + if (elements.length > maxScrollBucket) { + Rectangle bounds = listItems[maxScrollBucket].getBounds(); + gd.heightHint = Math.max(bounds.y + bounds.height, itemH * (maxScrollBucket + 1)); + } + listScrolled.setLayoutData(gd); + listScrolled.layout(true); + } + + private ListItem createListItem(Object[] elements, int i) { + ListItem item = new ListItem(listComposite, SWT.NONE, elements[i], i, (ILabelProvider) getLabelProvider()); + GridData gd = new GridData(SWT.FILL, SWT.FILL, true, false); + item.setLayoutData(gd); + if (i <= maxScrollBucket) { // this is how many visible by default + item.lazyInit(); + } else { + gd.heightHint = itemH; + } + return item; + } + + @Override + protected Widget doFindInputItem(Object element) { + return doFindItem(element); + } + + @Override + protected Widget doFindItem(Object element) { + if (listItems == null) + return null; + for (ListItem listItem : listItems) { + if (listItem.element.equals(element)) + return listItem; + } + return null; + } + + @Override + protected void doUpdateItem(Widget item, Object element, boolean fullMap) { + if (item instanceof ListItem) { + ((ListItem) item).lazyInit(); + } + } + + @SuppressWarnings("rawtypes") + @Override + protected List getSelectionFromWidget() { + ArrayList arrayList = new ArrayList<>(); + if (selIndex >= 0) + arrayList.add(listItems[selIndex].element); + return arrayList; + } + + @Override + protected void internalRefresh(Object element) { + if (element == null || element == getRoot()) { + refreshAll(); + return; + } + ListItem item = (ListItem) doFindItem(element); + ILabelProvider lp = (ILabelProvider) getLabelProvider(); + if (lp == null || item == null) + return; + item.setImage(lp.getImage(element)); + item.setText(lp.getText(element)); + } + + private Object[] filterElements(Object[] elements) { + Object[] topElements = elements.clone(); + if (getComparator() != null) + getComparator().sort(this, elements); + if (getTopComparator() != null) + getTopComparator().sort(this, topElements); + // only bottom part will be filtered + Object[] result = elements; + if (getFilters() != null) { + for (ViewerFilter f : getFilters()) { + result = f.filter(this, (Object) null, result); + } + } + if (separatorIndex <= 0 || !historySupported) + return result; + if (separatorIndex >= topElements.length) { + return topElements; // all elements will fit in top elements + } + ILaunchDescriptor[] descsCopy = new ILaunchDescriptor[separatorIndex + result.length]; + System.arraycopy(topElements, 0, descsCopy, 0, separatorIndex); // copy first N elements + System.arraycopy(result, 0, descsCopy, separatorIndex, result.length); // copy all into rest + return descsCopy; + } + + private Object[] getElements() { + IStructuredContentProvider cp = (IStructuredContentProvider) getContentProvider(); + if (cp == null) + return new Object[0]; + Object[] elements = cp.getElements(getInput()); + return elements; + } + + @Override + public void reveal(Object element) { + // TODO Auto-generated method stub + } + + public void setDefaultSelection(StructuredSelection selection) { + finalSelection = true; + setSelection(selection, true); + } + + @Override + protected void setSelectionToWidget(@SuppressWarnings("rawtypes") List l, boolean reveal) { + if (l.size() == 0) { + return; + } + Object sel = l.get(0); + Widget wid = doFindItem(sel); + if (wid instanceof ListItem) { + ListItem listItem = (ListItem) wid; + listItem.setSelected(true); + } + } + + public int getSeparatorIndex() { + return separatorIndex; + } + + public void setSeparatorIndex(int separatorIndex) { + this.separatorIndex = separatorIndex; + if (separatorIndex <= 0) + return; + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + String prefName = getHistoryPreferenceName(); + if (prefName != null && store.getInt(prefName) != getSeparatorIndex()) { + store.setValue(prefName, getSeparatorIndex()); + } + } + + protected String getHistoryPreferenceName() { + return historyPref; + } + + public int getItemCount() { + return listItems.length; + } + + /** + * Returns top element (provider element) in the begging on non-history list + * + * @return + */ + public Object getTopFilteredElement() { + if (listItems.length > 0) { + if (separatorIndex <= 0 || separatorIndex >= listItems.length || !historySupported) + return listItems[0].element; + else + return listItems[separatorIndex].element; + } + return null; + } + + public Object getTopElement() { + if (listItems.length > 0) { + return listItems[0].element; + } + return null; + } + + public ViewerComparator getTopComparator() { + return historyComparator; + } + + /** + * ViewerComparator comparator labels of elements by default + * + * @param comp + */ + public void setHistoryComparator(ViewerComparator comp) { + historyComparator = comp; + } + + public void setHistoryComparator(Comparator comp) { + historyComparator = comp == null ? null : new LaunchBarListViewerComparator(comp); + } + + public void setComparator(Comparator comp) { + setComparator(comp == null ? null : new LaunchBarListViewerComparator(comp)); + } + + public boolean isHistorySupported() { + return historySupported; + } + + public void setHistorySupported(boolean historySupported) { + this.historySupported = historySupported; + } + + public void setHistoryPreferenceName(String historyPreferenceName) { + this.historyPref = historyPreferenceName; + if (historyPreferenceName != null) { + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + int separator = store.getInt(historyPreferenceName); + if (separator <= 0) + separator = 1; + setSeparatorIndex(separator); + } + } + + /** + * final selection will be set to true when user made a final selection in a list for example when double click on entry or + * pressed enter key + */ + public boolean isFinalSelection() { + return finalSelection; + } + + public void setFinalSelection(boolean finalSelection) { + this.finalSelection = finalSelection; + } + + public void setFocus() { + if (selIndex >= 0 && listItems != null && listItems.length < selIndex) + listItems[selIndex].setFocus(); + else + getControl().setFocus(); + } + + public void setFilterVisible(boolean vis) { + filterControl.setVisible(vis); + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferenceInitializer.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferenceInitializer.java new file mode 100644 index 00000000000..13ae9196f8d --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferenceInitializer.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer; +import org.eclipse.jface.preference.IPreferenceStore; + +public class LaunchBarPreferenceInitializer extends AbstractPreferenceInitializer { + + @Override + public void initializeDefaultPreferences() { + IPreferenceStore store = Activator.getDefault().getPreferenceStore(); + store.setDefault(Activator.PREF_ENABLE_LAUNCHBAR, true); + store.setDefault(Activator.PREF_ENABLE_BUILDBUTTON, true); + store.setDefault(Activator.PREF_ALWAYS_TARGETSELECTOR, false); + store.setDefault(Activator.PREF_LAUNCH_HISTORY_SIZE, 3); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferencePage.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferencePage.java new file mode 100644 index 00000000000..629aa3047de --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarPreferencePage.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.jface.preference.BooleanFieldEditor; +import org.eclipse.jface.preference.FieldEditorPreferencePage; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +public class LaunchBarPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage { + + public LaunchBarPreferencePage() { + super(GRID); + } + + @Override + public void init(IWorkbench workbench) { + setPreferenceStore(Activator.getDefault().getPreferenceStore()); + setDescription(Messages.LaunchBarPreferencePage_0); + } + + @Override + protected void createFieldEditors() { + addField(new BooleanFieldEditor(Activator.PREF_ENABLE_LAUNCHBAR, Messages.LaunchBarPreferencePage_1, + getFieldEditorParent())); + addField(new BooleanFieldEditor(Activator.PREF_ENABLE_BUILDBUTTON, + Messages.LaunchBarPreferencePage_EnableBuildButton, getFieldEditorParent())); + addField(new BooleanFieldEditor(Activator.PREF_ALWAYS_TARGETSELECTOR, + Messages.LaunchBarPreferencePage_AlwaysTargetSelector, getFieldEditorParent())); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarWidgetIds.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarWidgetIds.java new file mode 100644 index 00000000000..f1ae03ff455 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/LaunchBarWidgetIds.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +public interface LaunchBarWidgetIds { + + public static final String ID = "org.eclipse.swtbot.widget.key"; //$NON-NLS-1$ + + public static final String CONFIG_SELECTOR = "org.eclipse.launchbar.selector.config"; //$NON-NLS-1$ + + public static final String POPUP = "org.eclipse.launchbar.popup"; //$NON-NLS-1$ + public static final String EDIT = "org.eclipse.launchbar.edit"; //$NON-NLS-1$ + public static final String NEW = "org.eclipse.launchbar.new"; //$NON-NLS-1$ + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Messages.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Messages.java new file mode 100644 index 00000000000..f2bf8fa27b5 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Messages.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.launchbar.ui.controls.internal.messages"; //$NON-NLS-1$ + public static String ConfigSelector_0; + public static String ConfigSelector_1; + public static String ConfigSelector_2; + public static String ConfigSelector_3; + public static String CSelector_0; + public static String CSelector_1; + public static String EditButton_0; + public static String FilterControl_0; + public static String FilterControl_1; + public static String LaunchBarControl_0; + public static String LaunchBarControl_Build; + public static String LaunchBarControl_Launch; + public static String LaunchBarControl_Stop; + public static String LaunchBarListViewer_0; + public static String LaunchBarPreferencePage_0; + public static String LaunchBarPreferencePage_1; + public static String LaunchBarPreferencePage_AlwaysTargetSelector; + public static String LaunchBarPreferencePage_EnableBuildButton; + public static String LaunchConfigurationEditDialog_0; + public static String LaunchConfigurationEditDialog_1; + public static String LaunchConfigurationEditDialog_2; + public static String LaunchConfigurationEditDialog_3; + public static String LaunchConfigurationEditDialog_4; + public static String LaunchConfigurationEditDialog_5; + public static String LaunchConfigurationEditDialog_6; + public static String ModeSelector_0; + public static String ModeSelector_ToolTip; + public static String TargetSelector_ToolTipPrefix; + public static String TargetSelector_CreateNewTarget; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ModeSelector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ModeSelector.java new file mode 100644 index 00000000000..d885b581456 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/ModeSelector.java @@ -0,0 +1,251 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.ui.IDebugUIConstants; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.ui.ILaunchBarUIConstants; +import org.eclipse.osgi.util.NLS; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.ToolItem; + +public class ModeSelector extends CSelector { + private static final String[] noModes = new String[] { "---" }; //$NON-NLS-1$ + private final ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + private Map modeButtonImages = new HashMap<>(); + + public ModeSelector(Composite parent, int style) { + super(parent, style); + setToolTipText(Messages.ModeSelector_0); + setContentProvider(new IStructuredContentProvider() { + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + @Override + public void dispose() { + } + + @Override + public Object[] getElements(Object inputElement) { + try { + ILaunchMode[] modes = manager.getLaunchModes(); + if (modes.length > 0) + return modes; + } catch (CoreException e) { + Activator.log(e); + } + return noModes; + } + }); + setLabelProvider(new LabelProvider() { + private Map images = new HashMap<>(); + + @Override + public void dispose() { + super.dispose(); + for (Image image : images.values()) { + image.dispose(); + } + } + + @Override + public Image getImage(Object element) { + if (element instanceof ILaunchMode) { + ILaunchMode mode = (ILaunchMode) element; + ILaunchGroup group = getLaunchGroup(mode); + if (group != null) { + ImageDescriptor imageDesc = group.getImageDescriptor(); + if (imageDesc == null) + return null; + Image image = images.get(imageDesc); + if (image == null) { + image = imageDesc.createImage(); + images.put(imageDesc, image); + } + return image; + } + } + return super.getImage(element); + } + + @Override + public String getText(Object element) { + if (element instanceof ILaunchMode) { + ILaunchMode mode = (ILaunchMode) element; + ILaunchGroup group = getLaunchGroup(mode); + if (group != null) { + return group.getLabel().replace("&", ""); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + return super.getText(element); + } + }); + setSorter((o1, o2) -> { + if (o1 instanceof ILaunchMode && o2 instanceof ILaunchMode) { + String mode1 = ((ILaunchMode) o1).getIdentifier(); + String mode2 = ((ILaunchMode) o2).getIdentifier(); + // run comes first, then debug, then the rest + if (mode1.equals("run")) { //$NON-NLS-1$ + if (mode2.equals("run")) //$NON-NLS-1$ + return 0; + else + return -1; + } + if (mode2.equals("run")) //$NON-NLS-1$ + return 1; + if (mode1.equals("debug")) { //$NON-NLS-1$ + if (mode2.equals("debug")) //$NON-NLS-1$ + return 0; + else + return -1; + } + if (mode2.equals("debug")) //$NON-NLS-1$ + return 1; + } + return 0; + }); + } + + @Override + public void dispose() { + super.dispose(); + + for (Image image : modeButtonImages.values()) { + image.dispose(); + } + } + + protected ILaunchGroup getDefaultLaunchGroup(String mode) { + String groupId; + if (mode.equals(ILaunchManager.DEBUG_MODE)) { + groupId = IDebugUIConstants.ID_DEBUG_LAUNCH_GROUP; + } else if (mode.equals(ILaunchManager.PROFILE_MODE)) { + groupId = IDebugUIConstants.ID_PROFILE_LAUNCH_GROUP; + } else { + groupId = IDebugUIConstants.ID_RUN_LAUNCH_GROUP; + } + return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(groupId); + } + + protected ILaunchGroup getLaunchGroup(String mode) throws CoreException { + ILaunchConfigurationType type = manager.getLaunchConfigurationType(manager.getActiveLaunchDescriptor(), + manager.getActiveLaunchTarget()); + if (type == null) + return null; + return DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(type, mode); + } + + @Override + protected void fireSelectionChanged() { + Object selected = getSelection(); + if (selected instanceof ILaunchMode) { + ILaunchMode mode = (ILaunchMode) selected; + try { + manager.setActiveLaunchMode(mode); + } catch (CoreException e) { + Activator.log(e); + } catch (Exception e) { + // manager can throw illegal state exception hopefully we never + // get it + Activator.log(e); + } + } + } + + @Override + public Point computeSize(int wHint, int hHint, boolean changed) { + return super.computeSize(150, hHint, changed); + } + + @Override + public void setSelection(Object element) { + if (element == null) + element = noModes[0]; + if (isDisposed()) + return; + super.setSelection(element); + updateLaunchButton(findLaunchButton()); + } + + private ToolItem findLaunchButton() { + String commandId = ILaunchBarUIConstants.CMD_LAUNCH; + for (Control control : getParent().getChildren()) { + if (control instanceof ToolBar) { + for (ToolItem toolItem : ((ToolBar) control).getItems()) { + if (commandId.equals(toolItem.getData("command"))) { //$NON-NLS-1$ + // found launch button + return toolItem; + } + } + } + } + Activator.log(new RuntimeException("Launch button is not found in toolbar")); //$NON-NLS-1$ + return null; + } + + private void updateLaunchButton(ToolItem toolItem) { + if (toolItem == null || isDisposed()) { + return; + } + Object selection = getSelection(); + if (selection instanceof ILaunchMode) { + ILaunchMode mode = (ILaunchMode) selection; + toolItem.setToolTipText(NLS.bind(Messages.ModeSelector_ToolTip, mode.getLabel())); + ILaunchGroup group = getLaunchGroup(mode); + // we cannot use mode id as id, since external tool group and run group have same "run" id for the mode + // but different images + String id = group.getIdentifier(); + Image image = modeButtonImages.get(id); + if (image == null) { + Image bgImage = Activator.getDefault().getImageRegistry().get(Activator.IMG_BUTTON_BACKGROUND); + Image modeImage = getLabelProvider().getImage(mode); + ImageDescriptor imageDesc = new LaunchBarButtonImageDescriptor(modeImage, bgImage); + image = imageDesc.createImage(); + modeButtonImages.put(id, image); + } + toolItem.setImage(image); + } + } + + public ILaunchGroup getLaunchGroup(ILaunchMode mode) { + ILaunchGroup group = null; + try { + group = getLaunchGroup(mode.getIdentifier()); + } catch (CoreException e) { + Activator.log(e); + } + if (group == null) { + group = getDefaultLaunchGroup(mode.getIdentifier()); + } + return group; + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/OpenLaunchSelector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/OpenLaunchSelector.java new file mode 100644 index 00000000000..f2ee5997b3a --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/OpenLaunchSelector.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2015, 2019 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Alena Laskavaia + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import java.util.List; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.Status; +import org.eclipse.e4.core.contexts.EclipseContextFactory; +import org.eclipse.e4.core.contexts.IEclipseContext; +import org.eclipse.e4.ui.model.application.MApplication; +import org.eclipse.e4.ui.model.application.ui.menu.MToolControl; +import org.eclipse.e4.ui.workbench.modeling.EModelService; +import org.osgi.framework.FrameworkUtil; + +public class OpenLaunchSelector extends AbstractHandler { + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + IEclipseContext serviceContext = EclipseContextFactory.getServiceContext( + FrameworkUtil.getBundle(org.eclipse.e4.ui.workbench.IWorkbench.class).getBundleContext()); + MApplication application = serviceContext.get(MApplication.class); + EModelService service = application.getContext().get(EModelService.class); + List findElements = service.findElements(application, LaunchBarControl.ID, null, null); + if (!findElements.isEmpty()) { + MToolControl mpart = (MToolControl) findElements.get(0); + Object bar = mpart.getObject(); + if (bar instanceof LaunchBarControl) { + ((LaunchBarControl) bar).getConfigSelector().openPopup(); + } + } + return Status.OK_STATUS; + } +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/TargetSelector.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/TargetSelector.java new file mode 100644 index 00000000000..66a51a26aa9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/TargetSelector.java @@ -0,0 +1,265 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.resource.CompositeImageDescriptor; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.ILaunchTargetListener; +import org.eclipse.launchbar.core.target.ILaunchTargetManager; +import org.eclipse.launchbar.core.target.TargetStatus; +import org.eclipse.launchbar.core.target.TargetStatus.Code; +import org.eclipse.launchbar.ui.target.ILaunchTargetUIManager; +import org.eclipse.launchbar.ui.target.NewLaunchTargetWizardAction; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.MouseTrackAdapter; +import org.eclipse.swt.events.MouseTrackListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.PlatformUI; + +public class TargetSelector extends CSelector implements ILaunchTargetListener { + + private final ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + private final ILaunchTargetUIManager targetUIManager = Activator.getService(ILaunchTargetUIManager.class); + private final ILaunchTargetManager targetManager = Activator.getService(ILaunchTargetManager.class); + + private static final ILaunchTarget[] noTargets = new ILaunchTarget[] { ILaunchTarget.NULL_TARGET }; + + public TargetSelector(Composite parent, int style) { + super(parent, style); + + targetManager.addListener(this); + + setContentProvider(new IStructuredContentProvider() { + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + } + + @Override + public void dispose() { + } + + @Override + public Object[] getElements(Object inputElement) { + try { + return manager.getLaunchTargets(manager.getActiveLaunchDescriptor()); + } catch (CoreException e) { + Activator.log(e); + return noTargets; + } + } + }); + + setLabelProvider(new LabelProvider() { + @Override + public String getText(Object element) { + if (element instanceof ILaunchTarget) { + ILaunchTarget target = (ILaunchTarget) element; + ILabelProvider provider = targetUIManager.getLabelProvider(target); + return provider != null ? provider.getText(target) : target.getId(); + } + return super.getText(element); + } + + @Override + public Image getImage(Object element) { + if (element == ILaunchTarget.NULL_TARGET) { + return null; + } + if (element instanceof ILaunchTarget) { + ILaunchTarget target = (ILaunchTarget) element; + ILabelProvider provider = targetUIManager.getLabelProvider(target); + if (provider != null) { + final Image baseImage = provider.getImage(target); + final TargetStatus status = targetManager.getStatus(target); + if (status.getCode() == Code.OK) { + return baseImage; + } else { + String compId = String.format("%s.%s.%s", target.getTypeId(), target.getId(), //$NON-NLS-1$ + status.getCode()); + Image image = Activator.getDefault().getImageRegistry().get(compId); + if (image == null && baseImage != null) { + ImageDescriptor desc = new CompositeImageDescriptor() { + @Override + protected Point getSize() { + Rectangle bounds = baseImage.getBounds(); + return new Point(bounds.width, bounds.height); + } + + @Override + protected void drawCompositeImage(int width, int height) { + Image overlay = PlatformUI.getWorkbench().getSharedImages() + .getImage(status.getCode() == Code.ERROR + ? ISharedImages.IMG_DEC_FIELD_ERROR + : ISharedImages.IMG_DEC_FIELD_WARNING); + drawImage(baseImage.getImageData(), 0, 0); + int y = baseImage.getBounds().height - overlay.getBounds().height; + drawImage(overlay.getImageData(), 0, y); + } + }; + image = desc.createImage(); + Activator.getDefault().getImageRegistry().put(compId, image); + } + return image; + } + } + } + return super.getImage(element); + } + }); + + setSorter((o1, o2) -> { + // Sort by name + String s1 = String.valueOf(o1); + String s2 = String.valueOf(o2); + return s1.compareTo(s2); + }); + } + + @Override + public boolean isEditable(Object element) { + return true; + } + + @Override + public void handleEdit(Object element) { + targetUIManager.editLaunchTarget((ILaunchTarget) getSelection()); + } + + @Override + public boolean hasActionArea() { + return true; + } + + @Override + public void createActionArea(final Composite parent) { + final Composite createButton = new Composite(parent, SWT.BORDER); + GridDataFactory.fillDefaults().grab(true, false).applyTo(createButton); + GridLayoutFactory.fillDefaults().margins(7, 7).applyTo(createButton); + createButton.setBackground(getBackground()); + + final Label createLabel = new Label(createButton, SWT.NONE); + GridDataFactory.fillDefaults().grab(true, false).applyTo(createLabel); + createLabel.setBackground(getBackground()); + createLabel.setText(Messages.TargetSelector_CreateNewTarget); + + MouseListener mouseListener = new MouseAdapter() { + @Override + public void mouseUp(org.eclipse.swt.events.MouseEvent event) { + new NewLaunchTargetWizardAction().run(); + } + }; + + createButton.addMouseListener(mouseListener); + createLabel.addMouseListener(mouseListener); + + MouseTrackListener mouseTrackListener = new MouseTrackAdapter() { + @Override + public void mouseEnter(MouseEvent e) { + Color highlightColor = getHighlightColor(); + createButton.setBackground(highlightColor); + createLabel.setBackground(highlightColor); + } + + @Override + public void mouseExit(MouseEvent e) { + Color backgroundColor = getBackground(); + createButton.setBackground(backgroundColor); + createLabel.setBackground(backgroundColor); + } + }; + createButton.addMouseTrackListener(mouseTrackListener); + createLabel.addMouseTrackListener(mouseTrackListener); + } + + @Override + protected void fireSelectionChanged() { + Object selection = getSelection(); + if (selection instanceof ILaunchTarget) { + ILaunchTarget target = (ILaunchTarget) selection; + try { + manager.setActiveLaunchTarget(target); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + public void setToolTipText(ILaunchTarget target) { + String text = Messages.TargetSelector_ToolTipPrefix + ": " + targetManager.getStatus(target).getMessage(); //$NON-NLS-1$ + setToolTipText(text); + } + + @Override + public Point computeSize(int wHint, int hHint, boolean changed) { + return super.computeSize(200, hHint, changed); + } + + @Override + public void setSelection(Object element) { + if (isDisposed()) + return; + if (element == null) { + element = noTargets[0]; + } else if (element instanceof ILaunchTarget) { + setToolTipText((ILaunchTarget) element); + } + super.setSelection(element); + } + + @Override + public void dispose() { + super.dispose(); + targetManager.removeListener(this); + } + + @Override + public void update(Object element) { + super.update(element); + if (element != null && element instanceof ILaunchTarget) { + setToolTipText((ILaunchTarget) element); + } else { + setToolTipText(Messages.TargetSelector_ToolTipPrefix); + } + } + + @Override + public void launchTargetStatusChanged(ILaunchTarget target) { + try { + if (target.equals(manager.getActiveLaunchTarget())) { + refresh(); + } + } catch (CoreException e) { + Activator.log(e); + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Transition.java b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Transition.java new file mode 100644 index 00000000000..06eb83433a4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/Transition.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.controls.internal; + +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; + +public class Transition implements Runnable { + + private final Control control; + private final int tick; + private int current; + private int to; + private int incr; + + public Transition(Control control, int current, int tick) { + this.control = control; + this.current = current; + this.tick = tick; + } + + @Override + public void run() { + current += incr; + if (!control.isDisposed()) + control.redraw(); + if (!done()) + Display.getCurrent().timerExec(tick, this); + } + + public void to(int to) { + if (current == to) + return; + + this.to = to; + this.incr = current > to ? -1 : 1; + Display.getCurrent().timerExec(tick, this); + } + + public int getCurrent() { + return current; + } + + public boolean done() { + return current == to; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/messages.properties b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/messages.properties new file mode 100644 index 00000000000..a6b1af4cd02 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.controls/src/org/eclipse/launchbar/ui/controls/internal/messages.properties @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2016 QNX Software Systems and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ +ConfigSelector_0=No Launch Configurations +ConfigSelector_1=Launch Configuration +ConfigSelector_2=New Launch Configuration... +ConfigSelector_3=Create Launch Configuration +CSelector_0=Closing popup +CSelector_1=Updating launch bar selection +EditButton_0=Edit +FilterControl_0=type filter text +FilterControl_1={0} {1} matches. +LaunchBarControl_0=on +LaunchBarControl_Build=Build +LaunchBarControl_Launch=Launch +LaunchBarControl_Stop=Stop +LaunchBarListViewer_0=Increase/Decrease size of recently used elements pane +LaunchBarPreferencePage_0=Preferences for the Launch Bar +LaunchBarPreferencePage_1=Enable the Launch Bar +LaunchBarPreferencePage_AlwaysTargetSelector=Always show the target selector +LaunchBarPreferencePage_EnableBuildButton=Enable the Build button +LaunchConfigurationEditDialog_0=Delete +LaunchConfigurationEditDialog_1=Duplicate +LaunchConfigurationEditDialog_2=Launch +LaunchConfigurationEditDialog_3=Confirm Delete +LaunchConfigurationEditDialog_4=Are you sure you want to delete +LaunchConfigurationEditDialog_5=Deleting launch configuration +LaunchConfigurationEditDialog_6=Duplicating launch configuration +ModeSelector_0=Launch Mode +ModeSelector_ToolTip=Launch in ''{0}'' mode +TargetSelector_ToolTipPrefix=Launch Target +TargetSelector_CreateNewTarget=New Launch Target... diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.classpath b/launchbar/org.eclipse.launchbar.ui.tests/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.project b/launchbar/org.eclipse.launchbar.ui.tests/.project new file mode 100644 index 00000000000..4883f55ece3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.ui.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..ad05599159f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=ignore +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=ignore +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=ignore +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=ignore +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..51a63ec9988 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=2 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.ui.tests/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.ui.tests/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..64775252740 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Launch Bar UI Tests +Bundle-SymbolicName: org.eclipse.launchbar.ui.tests +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: Eclipse CDT +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.junit;bundle-version="4.12.0", + org.eclipse.swtbot.go;bundle-version="2.7.0", + org.eclipse.debug.core;bundle-version="3.11.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Import-Package: org.eclipse.launchbar.ui.controls.internal +Bundle-Activator: org.eclipse.launchbar.ui.tests.internal.Activator +Automatic-Module-Name: org.eclipse.launchbar.ui.tests diff --git a/launchbar/org.eclipse.launchbar.ui.tests/build.properties b/launchbar/org.eclipse.launchbar.ui.tests/build.properties new file mode 100644 index 00000000000..34d2e4d2dad --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/build.properties @@ -0,0 +1,4 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + . diff --git a/launchbar/org.eclipse.launchbar.ui.tests/pom.xml b/launchbar/org.eclipse.launchbar.ui.tests/pom.xml new file mode 100644 index 00000000000..f0a1512c530 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/pom.xml @@ -0,0 +1,44 @@ + + + 4.0.0 + + + org.eclipse.launchbar + 2.4.1-SNAPSHOT + ../../pom.xml + parent + + + org.eclipse.launchbar.ui.tests + 1.0.0-SNAPSHOT + eclipse-test-plugin + + + + + org.eclipse.tycho + tycho-surefire-plugin + ${tycho-version} + + + true + false + + **/AutomatedIntegrationSuite.* + + true + + + p2-installable-unit + org.eclipse.pde.feature.group + + + org.eclipse.sdk.ide + + + + + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotCSelector.java b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotCSelector.java new file mode 100644 index 00000000000..15f64f45481 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotCSelector.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2017, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.tests; + +import org.eclipse.launchbar.ui.controls.internal.CSelector; +import org.eclipse.launchbar.ui.controls.internal.LaunchBarWidgetIds; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swtbot.swt.finder.SWTBot; +import org.eclipse.swtbot.swt.finder.SWTBotWidget; +import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException; +import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory; +import org.eclipse.swtbot.swt.finder.results.Result; +import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl; + +@SWTBotWidget(clasz = CSelector.class, preferredName = "cselector") +public class SWTBotCSelector extends AbstractSWTBotControl { + + public static SWTBotCSelector withId(String id) throws WidgetNotFoundException { + return new SWTBotCSelector(new SWTBot().widget(WidgetMatcherFactory.withId(id))); + } + + public SWTBotCSelector(CSelector w) throws WidgetNotFoundException { + super(w); + } + + public SWTBot bot() { + return new SWTBot(widget); + } + + public void click(int x, int y) { + notify(SWT.MouseEnter); + notify(SWT.MouseMove); + notify(SWT.Activate); + notify(SWT.FocusIn); + notify(SWT.MouseDown, createMouseEvent(x, y, 1, SWT.NONE, 1)); + notify(SWT.MouseUp, createMouseEvent(x, y, 1, SWT.BUTTON1, 1)); + } + + @Override + public SWTBotCSelector click() { + Point size = syncExec((Result) () -> widget.getSize()); + click(size.x / 2, size.y / 2); + return this; + } + + public void clickEdit() { + bot().buttonWithId(LaunchBarWidgetIds.EDIT).click(); // $NON-NLS-1$ + } + + public void select(String text) { + click(); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotConfigSelector.java b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotConfigSelector.java new file mode 100644 index 00000000000..585ae41c9a9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/SWTBotConfigSelector.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright (c) 2017, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.tests; + +import org.eclipse.launchbar.ui.controls.internal.ConfigSelector; +import org.eclipse.launchbar.ui.controls.internal.LaunchBarWidgetIds; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swtbot.swt.finder.SWTBot; +import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException; +import org.eclipse.swtbot.swt.finder.matchers.WidgetMatcherFactory; +import org.eclipse.swtbot.swt.finder.results.Result; +import org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBotControl; +import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell; + +public class SWTBotConfigSelector extends SWTBotCSelector { + + private class ActionArea extends AbstractSWTBotControl { + public ActionArea(SWTBotShell shell) throws WidgetNotFoundException { + super(shell.bot().widget(WidgetMatcherFactory.withId(LaunchBarWidgetIds.NEW))); + } + + public void click(int x, int y) { + notify(SWT.MouseEnter); + notify(SWT.MouseMove); + notify(SWT.Activate); + notify(SWT.FocusIn); + notify(SWT.MouseDown, createMouseEvent(x, y, 1, SWT.NONE, 1)); + notify(SWT.MouseUp, createMouseEvent(x, y, 1, SWT.BUTTON1, 1)); + } + + @Override + public ActionArea click() { + Point size = syncExec((Result) () -> widget.getSize()); + click(size.x / 2, size.y / 2); + return this; + } + } + + public static class NewConfigDialog extends SWTBotShell { + public NewConfigDialog(Shell shell) { + super(shell); + } + + public NewConfigDialog setMode(String mode) { + bot().tableInGroup("Launch Mode").select(mode); + return this; + } + + public NewConfigDialog setType(String type) { + bot().tableInGroup("Launch Configuration Type").select(type); + return this; + } + + public NewConfigDialog next() { + bot().button("Next >").click(); + return this; + } + + public NewConfigDialog finish() { + bot().button("Finish").click(); + return this; + } + } + + public SWTBotConfigSelector(ConfigSelector configSelector) { + super(configSelector); + } + + public SWTBotConfigSelector(SWTBot bot) { + this(bot.widget(WidgetMatcherFactory.withId(LaunchBarWidgetIds.CONFIG_SELECTOR))); + } + + public NewConfigDialog newConfigDialog() { + click(); + new ActionArea(bot().shellWithId(LaunchBarWidgetIds.POPUP)).click(); + return new NewConfigDialog(bot().shell("Create Launch Configuration").widget); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/Activator.java b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/Activator.java new file mode 100644 index 00000000000..fc8dede9838 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/Activator.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.tests.internal; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +public class Activator extends AbstractUIPlugin { + + private static BundleContext bundleContext; + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + bundleContext = context; + } + + public static T getService(Class service) { + ServiceReference ref = bundleContext.getServiceReference(service); + return ref != null ? bundleContext.getService(ref) : null; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/AutomatedIntegrationSuite.java b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/AutomatedIntegrationSuite.java new file mode 100644 index 00000000000..5b5e4fe225f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/AutomatedIntegrationSuite.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.tests.internal; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; + +@RunWith(Suite.class) +@Suite.SuiteClasses({ CreateLaunchConfigTests.class }) +public class AutomatedIntegrationSuite { + +} diff --git a/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/CreateLaunchConfigTests.java b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/CreateLaunchConfigTests.java new file mode 100644 index 00000000000..be70b33b98d --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui.tests/src/org/eclipse/launchbar/ui/tests/internal/CreateLaunchConfigTests.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.tests.internal; + +import static org.eclipse.swtbot.eclipse.finder.matchers.WidgetMatcherFactory.withPartName; + +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.launchbar.ui.tests.SWTBotConfigSelector; +import org.eclipse.launchbar.ui.tests.SWTBotConfigSelector.NewConfigDialog; +import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot; +import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView; +import org.eclipse.swtbot.swt.finder.SWTBot; +import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences; +import org.eclipse.swtbot.swt.finder.waits.ICondition; +import org.junit.Before; +import org.junit.BeforeClass; +import org.junit.Test; + +public class CreateLaunchConfigTests { + + private static SWTWorkbenchBot bot; + + @BeforeClass + public static void beforeClass() { + SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US"; + SWTBotPreferences.TIMEOUT = 10000; + bot = new SWTWorkbenchBot(); + } + + @Before + public void before() { + bot.resetWorkbench(); + + for (SWTBotView view : bot.views(withPartName("Welcome"))) { + view.close(); + } + } + + @Test + public void createEclipseApplication() throws Exception { + String configName = "Test Config"; + ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); + for (ILaunchConfiguration config : launchManager.getLaunchConfigurations()) { + if (config.getName().equals(configName)) { + config.delete(); + } + } + + bot.waitUntil(new ICondition() { + @Override + public void init(SWTBot bot) { + NewConfigDialog dialog = new SWTBotConfigSelector(bot).newConfigDialog(); + dialog.setMode("Debug").setType("Eclipse Application").next(); + dialog.bot().textWithLabel("Name:").setText(configName); + dialog.finish(); + } + + @Override + public boolean test() throws Exception { + for (ILaunchConfiguration config : launchManager.getLaunchConfigurations()) { + if (config.getName().equals(configName)) { + return true; + } + } + return false; + } + + @Override + public String getFailureMessage() { + return "Test config not found"; + } + }); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/.classpath b/launchbar/org.eclipse.launchbar.ui/.classpath new file mode 100644 index 00000000000..eca7bdba8f0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui/.gitignore b/launchbar/org.eclipse.launchbar.ui/.gitignore new file mode 100644 index 00000000000..ae3c1726048 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/launchbar/org.eclipse.launchbar.ui/.options b/launchbar/org.eclipse.launchbar.ui/.options new file mode 100644 index 00000000000..ed790682059 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.options @@ -0,0 +1,2 @@ +org.eclipse.launchbar.ui/iconSize32=false +org.eclipse.launchbar.ui/launchIconUpdater=false diff --git a/launchbar/org.eclipse.launchbar.ui/.project b/launchbar/org.eclipse.launchbar.ui/.project new file mode 100644 index 00000000000..2fc4d3a8356 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.project @@ -0,0 +1,28 @@ + + + org.eclipse.launchbar.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.core.prefs b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000000..2b6ecff8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,464 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore +org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch, *.xtend +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +org.eclipse.jdt.core.classpath.mainOnlyProjectHasTestOnlyDependency=error +org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled +org.eclipse.jdt.core.classpath.outputOverlappingAnotherSource=error +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes= +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.maxProblemPerUnit=100 +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning +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.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=warning +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.release=disabled +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=true +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +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=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_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=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_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_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=true +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_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.launching.prefs b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000000..f8a131b56e0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_COMPILER_COMPLIANCE_DOES_NOT_MATCH_JRE=warning +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning diff --git a/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.ui.prefs b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000000..e44576346c4 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,133 @@ +cleanup.add_default_serial_version_id=true +cleanup.add_generated_serial_version_id=false +cleanup.add_missing_annotations=true +cleanup.add_missing_deprecated_annotations=true +cleanup.add_missing_methods=false +cleanup.add_missing_nls_tags=false +cleanup.add_missing_override_annotations=true +cleanup.add_missing_override_annotations_interface_methods=true +cleanup.add_serial_version_id=false +cleanup.always_use_blocks=true +cleanup.always_use_parentheses_in_expressions=false +cleanup.always_use_this_for_non_static_field_access=false +cleanup.always_use_this_for_non_static_method_access=false +cleanup.convert_functional_interfaces=false +cleanup.convert_to_enhanced_for_loop=false +cleanup.correct_indentation=false +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=false +cleanup.insert_inferred_type_arguments=false +cleanup.make_local_variable_final=true +cleanup.make_parameters_final=false +cleanup.make_private_fields_final=true +cleanup.make_type_abstract_if_missing_method=false +cleanup.make_variable_declarations_final=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=false +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_redundant_modifiers=false +cleanup.remove_redundant_semicolons=true +cleanup.remove_redundant_type_arguments=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=true +cleanup.remove_unnecessary_nls_tags=false +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=false +cleanup.remove_unused_private_methods=true +cleanup.remove_unused_private_types=true +cleanup.sort_members=false +cleanup.sort_members_all=false +cleanup.use_anonymous_class_creation=false +cleanup.use_blocks=false +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_lambda=true +cleanup.use_parentheses_in_expressions=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_CDT +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_CDT +formatter_settings_version=14 +internal.default.compliance=user +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.ondemandthreshold=1000 +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.staticondemandthreshold=1000 +org.eclipse.jdt.ui.text.custom_code_templates= +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_functional_interfaces=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.insert_inferred_type_arguments=false +sp_cleanup.make_local_variable_final=true +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_redundant_modifiers=false +sp_cleanup.remove_redundant_semicolons=true +sp_cleanup.remove_redundant_type_arguments=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=true +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_anonymous_class_creation=false +sp_cleanup.use_blocks=false +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_lambda=true +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.api.tools.prefs b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000000..ec9fbf321d0 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,184 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD_WITH_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERCLASS_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_CHANGED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +CLASS_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CLASS_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +ENUM_ELEMENT_TYPE_CHANGED_TO_INTERFACE=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENTS=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETERS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_CHANGED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ANNOTATION=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_CLASS=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TO_ENUM=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +INTERFACE_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_ANNOTATION=Ignore +INVALID_JAVADOC_TAG=Error +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_ADDED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +METHOD_ELEMENT_TYPE_REMOVED_INTERFACE_BOUNDS=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETERS=Error +MISSING_EE_DESCRIPTIONS=Warning +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +changed_execution_env=Error +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +incompatible_api_component_version_report_major_without_breaking_change=Warning +incompatible_api_component_version_report_minor_without_api_change=Warning +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.prefs b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000000..d2dc703ba9e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/.settings/org.eclipse.pde.prefs @@ -0,0 +1,35 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=1 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=1 +compilers.p.build.src.includes=1 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=2 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.no.automatic.module=1 +compilers.p.not-externalized-att=1 +compilers.p.service.component.without.lazyactivation=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF b/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000000..ae2d05593ee --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/META-INF/MANIFEST.MF @@ -0,0 +1,21 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: LaunchBar UI +Bundle-SymbolicName: org.eclipse.launchbar.ui;singleton:=true +Bundle-Version: 2.3.0.qualifier +Bundle-Activator: org.eclipse.launchbar.ui.internal.Activator +Bundle-Vendor: Eclipse CDT +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.ui.ide, + org.eclipse.debug.ui, + org.eclipse.launchbar.core +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-Localization: plugin +Export-Package: org.eclipse.launchbar.ui, + org.eclipse.launchbar.ui.internal;x-internal:=true, + org.eclipse.launchbar.ui.internal.commands;x-internal:=true, + org.eclipse.launchbar.ui.internal.dialogs;x-internal:=true, + org.eclipse.launchbar.ui.target +Automatic-Module-Name: org.eclipse.launchbar.ui diff --git a/launchbar/org.eclipse.launchbar.ui/about.html b/launchbar/org.eclipse.launchbar.ui/about.html new file mode 100644 index 00000000000..164f781a8fd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

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

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/launchbar/org.eclipse.launchbar.ui/build.properties b/launchbar/org.eclipse.launchbar.ui/build.properties new file mode 100644 index 00000000000..e106532f226 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/build.properties @@ -0,0 +1,9 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + icons/,\ + plugin.properties,\ + about.html,\ + schema/ diff --git a/launchbar/org.eclipse.launchbar.ui/icons/localTarget.png b/launchbar/org.eclipse.launchbar.ui/icons/localTarget.png new file mode 100644 index 00000000000..ca77aee5bca Binary files /dev/null and b/launchbar/org.eclipse.launchbar.ui/icons/localTarget.png differ diff --git a/launchbar/org.eclipse.launchbar.ui/plugin.properties b/launchbar/org.eclipse.launchbar.ui/plugin.properties new file mode 100644 index 00000000000..1a942c2caa3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/plugin.properties @@ -0,0 +1,3 @@ +launchToolBar.label = LaunchBar +targetsView.name = Launch Targets +targetsContent.name = Launch Targets diff --git a/launchbar/org.eclipse.launchbar.ui/plugin.xml b/launchbar/org.eclipse.launchbar.ui/plugin.xml new file mode 100644 index 00000000000..da51d5e03f3 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/plugin.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd b/launchbar/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd new file mode 100644 index 00000000000..facbd8234f1 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/schema/launchBarUIContributions.exsd @@ -0,0 +1,178 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides a label provider to visualize launch descriptors in the descriptor selector. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Allows launch config providers to add build settings tabs to existing launch configuration tab groups when edited from the launch bar. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + + + + + /******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ + + + + diff --git a/launchbar/org.eclipse.launchbar.ui/schema/launchTargetTypeUI.exsd b/launchbar/org.eclipse.launchbar.ui/schema/launchTargetTypeUI.exsd new file mode 100644 index 00000000000..5d964f9875c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/schema/launchTargetTypeUI.exsd @@ -0,0 +1,273 @@ + + + + + + + + + This extension point allow to contribute UI element for launch targets, specifically target label provider +and target creation wizard. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Contribute a wizard that can create a launch target, normally it would be a wizard per target type. + + + + + + + + + + a unique name that can be used to identify this wizard + + + + + + + a translatable name of the wizard that will be used in the dialog box + + + + + + + + + + a relative path of an icon that will be used together with the name to represent the wizard +as one of the choices in the creation dialog box. + + + + + + + + + + a fully qualified name of the Java class implementing <samp>org.eclipse.ui.INewWizard</samp>. + + + + + + + + + + a help url that can describe this wizard in detail. +<p> +Since 3.0 +</p> + + + + + + + a larger image that can help describe this wizard. +<p> +Since 3.0 +</p> + + + + + + + + + + whether the wizard is capable of finishing without ever showing pages to the user. + + + + + + + whether the wizard provides any pages. + + + + + + + + + + + + + an optional subelement whose body contains a short text describing what the wizard will do when started + + + + + + + + Wizard that supports creation and editing of targets. These wizards are per target type. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + <extension + point="org.eclipse.launchbar.ui.launchTargetTypeUI"> + <launchTargetTypeUI + id="com.qnx.tools.ide.target.qconn" + labelProvider="com.qnx.tools.ide.target.qconn.internal.ui.QConnLaunchTargetLabelProvider"> + + </launchTargetTypeUI> + <wizard + class="com.qnx.tools.ide.target.qconn.internal.ui.wizards.NewQconnTargetWizard" + id="com.qnx.tools.ide.target.qconn.ui.NewQNXTarget" + name="New QNX Target"> + </wizard> + </extension> + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/DefaultDescriptorLabelProvider.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/DefaultDescriptorLabelProvider.java new file mode 100644 index 00000000000..0c5e3ba8e1f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/DefaultDescriptorLabelProvider.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.internal.Activator; +import org.eclipse.swt.graphics.Image; + +public class DefaultDescriptorLabelProvider extends LabelProvider { + + private Map images = new HashMap<>(); + + @Override + public void dispose() { + super.dispose(); + for (Image image : images.values()) { + image.dispose(); + } + } + + @Override + public Image getImage(Object element) { + if (element instanceof ILaunchDescriptor) { + ILaunchConfiguration config = ((ILaunchDescriptor) element).getAdapter(ILaunchConfiguration.class); + if (config != null) { + try { + ILaunchConfigurationType type = config.getType(); + ImageDescriptor imageDescriptor = DebugUITools.getDefaultImageDescriptor(type); + if (imageDescriptor != null) { + Image image = images.get(imageDescriptor); + if (image == null) { + image = imageDescriptor.createImage(); + images.put(imageDescriptor, image); + } + return image; + } + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + } + } + return super.getImage(element); + } + + @Override + public String getText(Object element) { + if (element instanceof ILaunchDescriptor) { + return ((ILaunchDescriptor) element).getName(); + } + return super.getText(element); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java new file mode 100644 index 00000000000..1188dafcc84 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarLaunchConfigDialog.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +/** + * The edit dialog for launch configurations created by the launch bar. Allows tabs to get the + * target associated with the edit session. + * + * @since 2.1 + */ +public interface ILaunchBarLaunchConfigDialog extends ILaunchConfigurationDialog { + + /** + * The target associated with the edit session, usually the active target when the session was + * started. + * + * @return launch target + */ + ILaunchTarget getLaunchTarget(); + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIConstants.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIConstants.java new file mode 100644 index 00000000000..9aefe2e4740 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIConstants.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import org.eclipse.launchbar.ui.internal.Activator; + +public interface ILaunchBarUIConstants { + + /** + * Parameter name for the edit target command. + */ + public static final String TARGET_NAME = "targetName"; //$NON-NLS-1$ + + // Command ids + public static final String CMD_BUILD = Activator.PLUGIN_ID + ".command.buildActive"; //$NON-NLS-1$ + public static final String CMD_LAUNCH = Activator.PLUGIN_ID + ".command.launchActive"; //$NON-NLS-1$ + public static final String CMD_STOP = Activator.PLUGIN_ID + ".command.stop"; //$NON-NLS-1$ + public static final String CMD_CONFIG = Activator.PLUGIN_ID + ".command.configureActiveLaunch"; //$NON-NLS-1$ + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIManager.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIManager.java new file mode 100644 index 00000000000..4527c267b6d --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/ILaunchBarUIManager.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright (c) 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.launchbar.core.ILaunchDescriptor; + +public interface ILaunchBarUIManager { + + ILabelProvider getLabelProvider(ILaunchDescriptor descriptor) throws CoreException; + + IStatus openConfigurationEditor(ILaunchDescriptor descriptor); + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizard.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizard.java new file mode 100644 index 00000000000..96569e8110c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizard.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationListener; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.jface.wizard.IWizardContainer; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.launchbar.ui.internal.dialogs.NewLaunchConfigEditPage; +import org.eclipse.launchbar.ui.internal.dialogs.NewLaunchConfigTypePage2; + +public class NewLaunchConfigWizard extends Wizard implements ILaunchConfigurationListener { + + private NewLaunchConfigTypePage2 typePage; + private NewLaunchConfigEditPage editPage; + + private List configsToDelete = new ArrayList<>(); + + public NewLaunchConfigWizard() { + editPage = new NewLaunchConfigEditPage(); + typePage = new NewLaunchConfigTypePage2(editPage); + + setWindowTitle(Messages.NewLaunchConfigWizard_0); + + // while the wizard is open, some ill behaved launch config tabs save the working copy. + // We need to make sure those saves are deleted when the dialog is finished. + // We also need to turn off listening in the tool bar manager so that we don't treat these + // as real launch configs. + DebugPlugin.getDefault().getLaunchManager().addLaunchConfigurationListener(this); + } + + @Override + public void setContainer(IWizardContainer wizardContainer) { + super.setContainer(wizardContainer); + + if (wizardContainer != null) { + // Edit page wants to know when it's about to change to itself + ((WizardDialog) wizardContainer).addPageChangingListener(editPage); + } + } + + @Override + public void addPages() { + addPage(typePage); + addPage(editPage); + } + + @Override + public boolean canFinish() { + if (getPage(editPage.getName()) == null) { + return false; + } + return super.canFinish(); + } + + public ILaunchConfigurationWorkingCopy getWorkingCopy() { + return editPage.getWorkingCopy(); + } + + public ILaunchMode getLaunchMode() { + // TODO we want to make sure the newly created config has the right mode + // selected in the launch bar + return null; + } + + @Override + public boolean performFinish() { + cleanUpConfigs(); + return editPage.performFinish(); + } + + @Override + public boolean performCancel() { + cleanUpConfigs(); + return super.performCancel(); + } + + void cleanUpConfigs() { + DebugPlugin.getDefault().getLaunchManager().removeLaunchConfigurationListener(this); + for (ILaunchConfiguration config : configsToDelete) { + try { + config.delete(); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + @Override + public void launchConfigurationAdded(ILaunchConfiguration configuration) { + if (!configuration.isWorkingCopy()) + configsToDelete.add(configuration); + } + + @Override + public void launchConfigurationChanged(ILaunchConfiguration configuration) { + // Nothing to do + } + + @Override + public void launchConfigurationRemoved(ILaunchConfiguration configuration) { + if (!configuration.isWorkingCopy()) + configsToDelete.remove(configuration); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizardDialog.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizardDialog.java new file mode 100644 index 00000000000..88836cdc720 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/NewLaunchConfigWizardDialog.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui; + +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Shell; + +/** + * Wizard Dialog for Launch Bar's new Launch Configuration Wizard. + * + * @since 2.3 + */ +public class NewLaunchConfigWizardDialog extends WizardDialog { + + /** + * Size of this dialog if there is no preference specifying a size. + */ + protected static final Point DEFAULT_INITIAL_DIALOG_SIZE = new Point(800, 720); + + public NewLaunchConfigWizardDialog(Shell parentShell, IWizard newWizard) { + super(parentShell, newWizard); + } + + /** + * Returns the name of the section that this dialog stores its settings in + * + * @return String + */ + protected String getDialogSettingsSectionName() { + return Activator.PLUGIN_ID + ".LAUNCH_CONFIGURATIONS_DIALOG_SECTION"; //$NON-NLS-1$ + } + + @Override + protected IDialogSettings getDialogBoundsSettings() { + IDialogSettings settings = Activator.getDefault().getDialogSettings(); + IDialogSettings section = settings.getSection(getDialogSettingsSectionName()); + if (section == null) { + section = settings.addNewSection(getDialogSettingsSectionName()); + } + return section; + } + + @Override + protected Point getInitialSize() { + try { + // Check if we've saved the height before + getDialogBoundsSettings().getInt("DIALOG_HEIGHT"); //$NON-NLS-1$ + return super.getInitialSize(); + } catch (NumberFormatException nfe) { + // Nope, return the default size + return DEFAULT_INITIAL_DIALOG_SIZE; + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java new file mode 100644 index 00000000000..cf673cad40f --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Activator.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 2014, 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + * Torkild U. Resheim - add preference to control target selector + * Vincent Guignot - Ingenico - add preference to control Build button + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.ImageRegistry; +import org.eclipse.launchbar.ui.ILaunchBarUIManager; +import org.eclipse.launchbar.ui.internal.target.LaunchTargetUIManager; +import org.eclipse.launchbar.ui.target.ILaunchTargetUIManager; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "org.eclipse.launchbar.ui"; //$NON-NLS-1$ + + // Images + public static final String IMG_LOCAL_TARGET = "localTarget"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + ImageRegistry imageRegistry = getImageRegistry(); + imageRegistry.put(IMG_LOCAL_TARGET, imageDescriptorFromPlugin(PLUGIN_ID, "icons/localTarget.png")); //$NON-NLS-1$ + + context.registerService(ILaunchTargetUIManager.class, new LaunchTargetUIManager(), null); + context.registerService(ILaunchBarUIManager.class, new LaunchBarUIManager(), null); + } + + @Override + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + + public Image getImage(String id) { + Image im = getImageRegistry().get(id); + if (im == null) { + ImageDescriptor des = getImageDescriptor(id); + if (des != null) { + im = des.createImage(); + getImageRegistry().put(id, im); + } + } + return im; + } + + public static ImageDescriptor getImageDescriptor(String path) { + return imageDescriptorFromPlugin(PLUGIN_ID, path); + } + + public static void log(IStatus status) { + plugin.getLog().log(status); + } + + public static void log(Exception e) { + if (e instanceof CoreException) + log(((CoreException) e).getStatus()); + plugin.getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getLocalizedMessage(), e)); + } + + public static T getService(Class cls) { + BundleContext context = getDefault().getBundle().getBundleContext(); + ServiceReference ref = context.getServiceReference(cls); + return ref != null ? context.getService(ref) : null; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java new file mode 100644 index 00000000000..8a85d9f4beb --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarLaunchConfigDialog.java @@ -0,0 +1,500 @@ +package org.eclipse.launchbar.ui.internal; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPresentationManager; +import org.eclipse.debug.ui.ILaunchConfigurationTab; +import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.IMessageProvider; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.dialogs.TitleAreaDialog; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.operation.ModalContext; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.wizard.ProgressMonitorPart; +import org.eclipse.launchbar.core.DefaultLaunchDescriptor; +import org.eclipse.launchbar.core.DefaultLaunchDescriptorType; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.ui.ILaunchBarLaunchConfigDialog; +import org.eclipse.launchbar.ui.ILaunchBarUIManager; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CTabFolder; +import org.eclipse.swt.custom.CTabItem; +import org.eclipse.swt.events.FocusAdapter; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +public class LaunchBarLaunchConfigDialog extends TitleAreaDialog implements ILaunchBarLaunchConfigDialog { + + private final ILaunchConfigurationWorkingCopy workingCopy; + private final ILaunchDescriptor descriptor; + private final ILaunchMode mode; + private final ILaunchTarget target; + private final ILaunchConfigurationTabGroup buildTabGroup; + private final String originalName; + + private ILaunchConfigurationTabGroup group; + private Text nameText; + private CTabFolder tabFolder; + private CTabItem lastSelection; + private ProgressMonitorPart pmPart; + private boolean initing; + + public static final int ID_DUPLICATE = IDialogConstants.CLIENT_ID + 1; + public static final int ID_DELETE = IDialogConstants.CLIENT_ID + 2; + + public LaunchBarLaunchConfigDialog(Shell shell, ILaunchConfigurationWorkingCopy workingCopy, + ILaunchDescriptor descriptor, ILaunchMode mode, ILaunchTarget target, + ILaunchConfigurationTabGroup buildTabGroup) { + super(shell); + + this.workingCopy = workingCopy; + this.descriptor = descriptor; + this.mode = mode; + this.target = target; + this.buildTabGroup = buildTabGroup; + this.originalName = workingCopy.getName(); + + setShellStyle(getShellStyle() | SWT.RESIZE); + } + + @Override + protected int getDialogBoundsStrategy() { + // Don't persist the size since it'll be different for every config + return DIALOG_PERSISTLOCATION; + } + + @Override + protected Control createDialogArea(Composite parent) { + initing = true; + + getShell().setText(Messages.LaunchBarLaunchConfigDialog_EditConfiguration); + boolean supportsTargets = true; + try { + supportsTargets = descriptor.getType().supportsTargets(); + } catch (CoreException e) { + Activator.log(e); + } + + try { + ILaunchBarUIManager uiManager = Activator.getService(ILaunchBarUIManager.class); + ILabelProvider labelProvider = uiManager.getLabelProvider(descriptor); + String descName = labelProvider != null ? labelProvider.getText(descriptor) : descriptor.getName(); + String typeName = workingCopy.getType().getName(); + if (supportsTargets) { + setTitle(String.format(Messages.LaunchBarLaunchConfigDialog_Edit2, typeName, descName, mode.getLabel(), + target.getId())); + } else { + setTitle( + String.format(Messages.LaunchBarLaunchConfigDialog_Edit1, typeName, descName, mode.getLabel())); + } + } catch (CoreException e) { + Activator.log(e); + } + + setMessage(Messages.LaunchBarLaunchConfigDialog_SetParameters); + + // create the top level composite for the dialog area + Composite composite = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.verticalSpacing = 0; + composite.setLayout(layout); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setFont(parent.getFont()); + + Composite nameComp = new Composite(composite, SWT.NONE); + nameComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + nameComp.setLayout(new GridLayout(2, false)); + + Label nameLabel = new Label(nameComp, SWT.NONE); + nameLabel.setText(Messages.LaunchBarLaunchConfigDialog_LaunchConfigName); + + nameText = new Text(nameComp, SWT.BORDER); + nameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + nameText.setText(workingCopy.getName()); + nameText.addModifyListener(e -> updateMessage()); + + tabFolder = new CTabFolder(composite, SWT.BORDER); + tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + tabFolder.addFocusListener(new FocusAdapter() { + @Override + public void focusGained(FocusEvent e) { + CTabItem selItem = tabFolder.getSelection(); + if (selItem != null) { + selItem.getControl().setFocus(); + } + } + }); + tabFolder.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + ILaunchConfigurationTab oldTab = (ILaunchConfigurationTab) lastSelection.getData(); + oldTab.deactivated(workingCopy); + + CTabItem selItem = tabFolder.getSelection(); + ILaunchConfigurationTab newTab = (ILaunchConfigurationTab) selItem.getData(); + newTab.activated(workingCopy); + + selItem.getControl().setFocus(); + } + }); + + try { + if (buildTabGroup != null) { + buildTabGroup.createTabs(this, mode.getIdentifier()); + + for (ILaunchConfigurationTab configTab : buildTabGroup.getTabs()) { + installTab(configTab, tabFolder); + } + + buildTabGroup.initializeFrom(workingCopy); + } + + group = LaunchConfigurationPresentationManager.getDefault().getTabGroup(workingCopy, mode.getIdentifier()); + group.createTabs(this, mode.getIdentifier()); + + for (ILaunchConfigurationTab configTab : group.getTabs()) { + CTabItem tabItem = installTab(configTab, tabFolder); + if (lastSelection == null) { + // Select the first tab by default + tabFolder.setSelection(tabItem); + lastSelection = tabItem; + } + } + + group.initializeFrom(workingCopy); + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + + pmPart = new ProgressMonitorPart(composite, new GridLayout(), true); + pmPart.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + pmPart.setVisible(false); + + initing = false; + return composite; + } + + private CTabItem installTab(ILaunchConfigurationTab tab, CTabFolder tabFolder) { + tab.setLaunchConfigurationDialog(this); + + CTabItem tabItem = new CTabItem(tabFolder, SWT.NONE); + tabItem.setData(tab); + tabItem.setText(tab.getName()); + tabItem.setImage(tab.getImage()); + + Composite tabComp = new Composite(tabFolder, SWT.NONE); + tabComp.setLayout(new GridLayout()); + tabItem.setControl(tabComp); + + tab.createControl(tabComp); + Control configControl = tab.getControl(); + configControl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + return tabItem; + } + + @Override + protected Control createButtonBar(Composite parent) { + Composite buttonBar = (Composite) super.createButtonBar(parent); + Control[] children = buttonBar.getChildren(); + Control okCancelButtons = children[children.length - 1]; + Control configButtons = createConfigButtons(buttonBar); + + // insert our buttons ahead of the OK/Cancel buttons + configButtons.moveAbove(okCancelButtons); + + return buttonBar; + } + + protected Control createConfigButtons(Composite parent) { + ((GridLayout) parent.getLayout()).numColumns++; + Composite composite = new Composite(parent, SWT.NONE); + // create a layout with spacing and margins appropriate for the font size. + GridLayout layout = new GridLayout(); + layout.numColumns = 0; // this is incremented by createButton + layout.makeColumnsEqualWidth = true; + layout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); + layout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); + layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); + layout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); + composite.setLayout(layout); + GridData data = new GridData(GridData.HORIZONTAL_ALIGN_CENTER | GridData.VERTICAL_ALIGN_CENTER); + composite.setLayoutData(data); + composite.setFont(parent.getFont()); + + // Allow Duplicate only if the resulting configuration is public + try { + if (DefaultLaunchDescriptorType.isPublic(workingCopy.getOriginal())) { + createButton(composite, ID_DUPLICATE, Messages.LaunchBarLaunchConfigDialog_Duplicate, false); + } + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + + String deleteText; + if (descriptor instanceof DefaultLaunchDescriptor) { + deleteText = Messages.LaunchBarLaunchConfigDialog_Delete; + } else { + deleteText = Messages.LaunchBarLaunchConfigDialog_Reset; + } + + // TODO if the descriptor is not a launch config, this should really say Reset + createButton(composite, ID_DELETE, deleteText, false); + + return composite; + } + + @Override + protected void buttonPressed(int buttonId) { + if (buttonId == ID_DUPLICATE) { + duplicatePressed(); + } else if (buttonId == ID_DELETE) { + deletePressed(); + } else { + super.buttonPressed(buttonId); + } + } + + protected void deletePressed() { + String title, message; + if (descriptor instanceof DefaultLaunchDescriptor) { + title = Messages.LaunchBarLaunchConfigDialog_DeleteTitle; + message = Messages.LaunchBarLaunchConfigDialog_DeleteConfirm; + } else { + title = Messages.LaunchBarLaunchConfigDialog_ResetTitle; + message = Messages.LaunchBarLaunchConfigDialog_ResetConfirm; + } + + if (MessageDialog.openConfirm(getShell(), title, String.format(message, workingCopy.getName()))) { + setReturnCode(ID_DELETE); + close(); + } + } + + protected void duplicatePressed() { + setReturnCode(ID_DUPLICATE); + close(); + } + + @Override + protected void okPressed() { + String newName = nameText.getText().trim(); + if (!newName.equals(originalName)) { + workingCopy.rename(newName); + } + + if (buildTabGroup != null) { + buildTabGroup.performApply(workingCopy); + } + group.performApply(workingCopy); + super.okPressed(); + } + + @Override + public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) + throws InvocationTargetException, InterruptedException { + Control lastControl = getShell().getDisplay().getFocusControl(); + if (lastControl != null && lastControl.getShell() != getShell()) { + lastControl = null; + } + getButton(IDialogConstants.OK_ID).setEnabled(false); + getButton(IDialogConstants.CANCEL_ID).setEnabled(false); + pmPart.attachToCancelComponent(null); + + try { + ModalContext.run(runnable, fork, pmPart, getShell().getDisplay()); + } finally { + pmPart.removeFromCancelComponent(null); + getButton(IDialogConstants.OK_ID).setEnabled(true); + getButton(IDialogConstants.CANCEL_ID).setEnabled(true); + if (lastControl != null) { + lastControl.setFocus(); + } + updateButtons(); + } + } + + @Override + public void updateButtons() { + // Lots of tabs want to be applied when this is called + if (!initing) { + ILaunchConfigurationTab[] tabs = getTabs(); + if (tabFolder != null && tabs != null) { + int pageIndex = tabFolder.getSelectionIndex(); + if (pageIndex >= 0) { + tabs[pageIndex].performApply(workingCopy); + } + } + } + } + + private String getTabsErrorMessage() { + ILaunchConfigurationTab activeTab = getActiveTab(); + if (activeTab != null) { + String message = activeTab.getErrorMessage(); + if (message != null) { + return message; + } + } + + for (ILaunchConfigurationTab tab : getTabs()) { + if (tab != activeTab) { + String message = tab.getErrorMessage(); + if (message != null) { + return message; + } + } + } + + return null; + } + + private String getTabsMessage() { + ILaunchConfigurationTab activeTab = getActiveTab(); + if (activeTab != null) { + String message = activeTab.getMessage(); + if (message != null) { + return message; + } + } + + for (ILaunchConfigurationTab tab : getTabs()) { + if (tab != activeTab) { + String message = tab.getMessage(); + if (message != null) { + return message; + } + } + } + + return null; + } + + @Override + public void updateMessage() { + if (initing) { + return; + } + + String newName = nameText.getText().trim(); + if (newName.isEmpty()) { + setMessage(Messages.LaunchBarLaunchConfigDialog_LCMustHaveName, IMessageProvider.ERROR); + return; + } + + if (!newName.equals(originalName)) { + // make sure it's not taken + try { + ILaunchManager manager = DebugPlugin.getDefault().getLaunchManager(); + + if (manager.isExistingLaunchConfigurationName(newName)) { + setMessage(Messages.LaunchBarLaunchConfigDialog_LCNameExists, IMessageProvider.ERROR); + return; + } + + if (!manager.isValidLaunchConfigurationName(newName)) { + setMessage(Messages.LaunchBarLaunchConfigDialog_LCNameNotValid, IMessageProvider.ERROR); + return; + } + } catch (CoreException e1) { + Activator.log(e1.getStatus()); + } + } + + for (ILaunchConfigurationTab tab : getTabs()) { + tab.isValid(workingCopy); + } + + Button okButton = getButton(IDialogConstants.OK_ID); + + String message = getTabsErrorMessage(); + if (message != null) { + setMessage(message, IMessageProvider.ERROR); + okButton.setEnabled(false); + return; + } + + message = getTabsMessage(); + setMessage(message); + okButton.setEnabled(true); + } + + @Override + public void setName(String name) { + if (nameText != null && !nameText.isDisposed()) { + nameText.setText(name); + } + } + + @Override + public String generateName(String name) { + return DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name); + } + + @Override + public ILaunchConfigurationTab[] getTabs() { + if (buildTabGroup != null) { + ILaunchConfigurationTab[] buildTabs = buildTabGroup.getTabs(); + ILaunchConfigurationTab[] mainTabs = group.getTabs(); + ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[buildTabs.length + mainTabs.length]; + System.arraycopy(buildTabs, 0, tabs, 0, buildTabs.length); + System.arraycopy(mainTabs, 0, tabs, buildTabs.length, mainTabs.length); + return tabs; + } else { + return group.getTabs(); + } + } + + @Override + public ILaunchConfigurationTab getActiveTab() { + CTabItem selItem = tabFolder.getSelection(); + if (selItem != null) { + return (ILaunchConfigurationTab) selItem.getData(); + } else { + return null; + } + } + + @Override + public String getMode() { + return mode.getIdentifier(); + } + + @Override + public ILaunchTarget getLaunchTarget() { + return target; + } + + @Override + public void setActiveTab(ILaunchConfigurationTab tab) { + for (CTabItem item : tabFolder.getItems()) { + if (tab.equals(item.getData())) { + tabFolder.setSelection(item); + return; + } + } + } + + @Override + public void setActiveTab(int index) { + tabFolder.setSelection(index); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java new file mode 100644 index 00000000000..7988001ce7c --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/LaunchBarUIManager.java @@ -0,0 +1,232 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPresentationManager; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension; +import org.eclipse.debug.ui.ILaunchConfigurationTabGroup; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.window.Window; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.core.internal.ExecutableExtension; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.ui.ILaunchBarUIManager; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; + +public class LaunchBarUIManager implements ILaunchBarUIManager { + + private Map> descriptorLabelProviders; + + // Map + private Map>> buildTabGroups; + + private ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + + private void init() { + if (descriptorLabelProviders == null) { + descriptorLabelProviders = new HashMap<>(); + buildTabGroups = new HashMap<>(); + + IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, + "launchBarUIContributions"); //$NON-NLS-1$ + IExtension[] extensions = point.getExtensions(); + for (IExtension extension : extensions) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + String elementName = element.getName(); + if (elementName.equals("descriptorUI")) { //$NON-NLS-1$ + String descriptorTypeId = element.getAttribute("descriptorTypeId"); //$NON-NLS-1$ + ExecutableExtension labelProvider = new ExecutableExtension<>(element, + "labelProvider"); //$NON-NLS-1$ + descriptorLabelProviders.put(descriptorTypeId, labelProvider); + } else if (elementName.equals("buildTabGroup")) { //$NON-NLS-1$ + String launchConfigTypeId = element.getAttribute("launchConfigType"); //$NON-NLS-1$ + String descriptorTypeId = element.getAttribute("launchDescriptorType"); //$NON-NLS-1$ + ExecutableExtension tabGroup = new ExecutableExtension<>(element, + "tabGroup"); //$NON-NLS-1$ + + Map> descGroup = buildTabGroups + .get(launchConfigTypeId); + if (descGroup == null) { + descGroup = new HashMap<>(); + buildTabGroups.put(launchConfigTypeId, descGroup); + } + + descGroup.put(descriptorTypeId, tabGroup); + } + } + } + } + } + + @Override + public ILabelProvider getLabelProvider(ILaunchDescriptor descriptor) throws CoreException { + init(); + ExecutableExtension provider = descriptorLabelProviders + .get(manager.getDescriptorTypeId(descriptor.getType())); + return provider != null ? provider.get() : null; + } + + @Override + public IStatus openConfigurationEditor(ILaunchDescriptor descriptor) { + if (descriptor == null) + return Status.OK_STATUS; + + // Display the error message + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + IStatus s = canOpenConfigurationEditor(descriptor); + if (!s.isOK()) { + MessageDialog.openError(shell, s.getMessage(), + s.getException() == null ? s.getMessage() : s.getException().getMessage()); + return s; + } + + try { + ILaunchMode mode = manager.getActiveLaunchMode(); + ILaunchTarget target = manager.getActiveLaunchTarget(); + ILaunchConfiguration config = manager.getLaunchConfiguration(descriptor, target); + + ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy(); + + ILaunchConfigurationTabGroup buildTabGroup = null; + Map> descGroups = buildTabGroups + .get(config.getType().getIdentifier()); + if (descGroups != null) { + ExecutableExtension tabGroup = descGroups + .get(manager.getDescriptorTypeId(descriptor.getType())); + if (tabGroup != null) { + buildTabGroup = tabGroup.create(); + } + } + + LaunchBarLaunchConfigDialog dialog = new LaunchBarLaunchConfigDialog(shell, workingCopy, descriptor, mode, + target, buildTabGroup); + switch (dialog.open()) { + case Window.OK: + if (!workingCopy.getOriginal().equals(workingCopy) + && (!workingCopy.getOriginal().getAttributes().equals(workingCopy.getAttributes()) + || !workingCopy.getOriginal().getName().equals(workingCopy.getName()))) { + workingCopy.doSave(); + } + break; + case LaunchBarLaunchConfigDialog.ID_DUPLICATE: { + String newName = DebugPlugin.getDefault().getLaunchManager() + .generateLaunchConfigurationName(workingCopy.getName()); + ILaunchConfigurationWorkingCopy newWorkingCopy = workingCopy.copy(newName); + newWorkingCopy.doSave(); + } + break; + case LaunchBarLaunchConfigDialog.ID_DELETE: + config.delete(); + break; + default: + break; + } + } catch (CoreException e) { + return e.getStatus(); + } + + return Status.OK_STATUS; + } + + private IStatus canOpenConfigurationEditor(ILaunchDescriptor desc) { + if (desc == null) + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.DescriptorMustNotBeNull, + new Exception(Messages.DescriptorMustNotBeNullDesc)); + ILaunchBarManager manager = Activator.getService(ILaunchBarManager.class); + ILaunchMode mode = null; + ILaunchTarget target = null; + try { + mode = manager.getActiveLaunchMode(); + target = manager.getActiveLaunchTarget(); + } catch (CoreException e) { + return e.getStatus(); + } + if (target == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NoActiveTarget, + new Exception(Messages.NoActiveTargetDesc)); + } + + ILaunchConfigurationType configType = null; + try { + configType = manager.getLaunchConfigurationType(desc, target); + } catch (CoreException ce) { + return ce.getStatus(); + } + + if (mode == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NoLaunchModeSelected, + new Exception(Messages.NoLaunchModeSelected)); + } + + ILaunchGroup group = DebugUIPlugin.getDefault().getLaunchConfigurationManager().getLaunchGroup(configType, + mode.getIdentifier()); + if (group == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NoLaunchGroupSelected, + new Exception(Messages.NoLaunchGroupSelected)); + } + + String mode2 = group.getMode(); + if (mode2 == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NoLaunchModeSelected, + new Exception(Messages.CannotEditLaunchConfiguration)); + } + + LaunchGroupExtension groupExt = DebugUIPlugin.getDefault().getLaunchConfigurationManager() + .getLaunchGroup(group.getIdentifier()); + if (groupExt != null) { + ILaunchConfiguration config = null; + try { + config = manager.getLaunchConfiguration(desc, target); + } catch (CoreException ce) { + // Ignore + } + if (config == null) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.LaunchConfigurationNotFound, + new Exception(Messages.LaunchConfigurationNotFoundDesc)); + } + try { + LaunchConfigurationPresentationManager mgr = LaunchConfigurationPresentationManager.getDefault(); + ILaunchConfigurationTabGroup tabgroup = mgr.getTabGroup(config, mode.getIdentifier()); + } catch (CoreException ce) { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.NoLaunchTabsDefined, + new Exception(Messages.NoLaunchTabsDefinedDesc)); + } + } else { + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.CannotEditLaunchConfiguration, + new Exception(Messages.CannotEditLaunchConfiguration)); + } + return Status.OK_STATUS; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Messages.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Messages.java new file mode 100644 index 00000000000..c8b2d135337 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/Messages.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright (c) 2014, 2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.launchbar.ui.internal.messages"; //$NON-NLS-1$ + + public static String BuildActiveCommandHandler_0; + public static String BuildActiveCommandHandler_1; + public static String StopActiveCommandHandler_0; + public static String StopActiveCommandHandler_1; + + public static String NewLaunchConfigEditPage_0; + public static String NewLaunchConfigEditPage_1; + public static String NewLaunchConfigEditPage_2; + public static String NewLaunchConfigEditPage_3; + public static String NewLaunchConfigEditPage_4; + public static String NewLaunchConfigEditPage_5; + public static String NewLaunchConfigEditPage_6; + public static String NewLaunchConfigEditPage_7; + public static String NewLaunchConfigModePage_0; + public static String NewLaunchConfigModePage_1; + public static String NewLaunchConfigModePage_2; + public static String NewLaunchConfigTypePage_0; + public static String NewLaunchConfigTypePage_1; + public static String NewLaunchConfigTypePage_2; + + public static String NewLaunchConfigTypePage2_Mode; + + public static String NewLaunchConfigTypePage2_Type; + public static String NewLaunchConfigWizard_0; + + public static String NewLaunchTargetWizard_Title; + + public static String NewLaunchTargetWizardSelectionPage_Description; + + public static String NewLaunchTargetWizardSelectionPage_Title; + + public static String DescriptorMustNotBeNull; + public static String DescriptorMustNotBeNullDesc; + public static String NoActiveTarget; + public static String NoActiveTargetDesc; + public static String NoLaunchConfigType; + public static String CannotEditLaunchConfiguration; + public static String NoLaunchModeSelected; + public static String NoLaunchGroupSelected; + public static String LaunchBarLaunchConfigDialog_Edit1; + public static String LaunchBarLaunchConfigDialog_Edit2; + public static String LaunchBarLaunchConfigDialog_EditConfiguration; + public static String LaunchBarLaunchConfigDialog_LaunchConfigName; + public static String LaunchBarLaunchConfigDialog_LCMustHaveName; + public static String LaunchBarLaunchConfigDialog_LCNameExists; + public static String LaunchBarLaunchConfigDialog_LCNameNotValid; + public static String LaunchBarLaunchConfigDialog_SetParameters; + public static String LaunchBarLaunchConfigDialog_Duplicate; + public static String LaunchBarLaunchConfigDialog_Delete; + public static String LaunchBarLaunchConfigDialog_Reset; + public static String LaunchBarLaunchConfigDialog_DeleteTitle; + public static String LaunchBarLaunchConfigDialog_ResetTitle; + public static String LaunchBarLaunchConfigDialog_DeleteConfirm; + public static String LaunchBarLaunchConfigDialog_ResetConfirm; + + public static String LaunchConfigurationNotFound; + public static String LaunchConfigurationNotFoundDesc; + + public static String LaunchTargetWizardDialog_Delete; + public static String NoLaunchTabsDefined; + public static String NoLaunchTabsDefinedDesc; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java new file mode 100644 index 00000000000..5ca972b1385 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/BuildActiveCommandHandler.java @@ -0,0 +1,220 @@ +/******************************************************************************* + * Copyright (c) 2014, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.commands; + +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.IBuildConfiguration; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchDelegate; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; +import org.eclipse.debug.core.model.ILaunchConfigurationDelegate2; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.core.target.launch.ILaunchConfigurationTargetedDelegate; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.BuildAction; +import org.eclipse.ui.ide.ResourceUtil; +import org.eclipse.ui.progress.UIJob; + +/** + * Build active project + */ +public class BuildActiveCommandHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ILaunchBarManager launchBarManager = Activator.getService(ILaunchBarManager.class); + ILaunchConfiguration config = launchBarManager.getActiveLaunchConfiguration(); + ILaunchMode launchMode = launchBarManager.getActiveLaunchMode(); + ILaunchTarget target = launchBarManager.getActiveLaunchTarget(); + + new UIJob(Display.getDefault(), Messages.BuildActiveCommandHandler_0) { + @Override + public boolean belongsTo(Object family) { + return ResourcesPlugin.FAMILY_MANUAL_BUILD.equals(family); + } + + @Override + public IStatus runInUIThread(IProgressMonitor monitor) { + final Collection projects = getProjects(config); + if (BuildAction.isSaveAllSet()) { + saveEditors(projects); + } + + new Job(Messages.BuildActiveCommandHandler_1) { + @Override + public boolean belongsTo(Object family) { + return ResourcesPlugin.FAMILY_MANUAL_BUILD.equals(family); + } + + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + if (config == null) { + // Default, build the workspace + ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, + monitor); + return Status.OK_STATUS; + } + + String mode = launchMode != null ? launchMode.getIdentifier() : "run"; //$NON-NLS-1$ + Set modes = new HashSet<>(); + modes.add(mode); + ILaunchDelegate delegate = config.getType().getPreferredDelegate(modes); + if (delegate == null) + delegate = config.getType().getDelegates(modes)[0]; + ILaunchConfigurationDelegate configDel = delegate.getDelegate(); + if (configDel instanceof ILaunchConfigurationTargetedDelegate) { + ILaunchConfigurationTargetedDelegate configDel2 = (ILaunchConfigurationTargetedDelegate) configDel; + boolean ret; + ret = configDel2.preLaunchCheck(config, mode, target, monitor); + if (!ret) { + return Status.CANCEL_STATUS; + } + if (!configDel2.buildForLaunch(config, mode, target, monitor)) { + return Status.OK_STATUS; + } + } else if (configDel instanceof ILaunchConfigurationDelegate2) { + ILaunchConfigurationDelegate2 configDel2 = (ILaunchConfigurationDelegate2) configDel; + boolean ret; + ret = configDel2.preLaunchCheck(config, mode, monitor); + if (!ret) { + return Status.CANCEL_STATUS; + } + if (!configDel2.buildForLaunch(config, mode, monitor)) { + return Status.OK_STATUS; + } + } + + // Fall through, do a normal build + if (projects.isEmpty()) { + ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, + monitor); + } else { + Collection buildConfigs = getBuildConfigs(projects); + ResourcesPlugin.getWorkspace().build( + buildConfigs.toArray(new IBuildConfiguration[buildConfigs.size()]), + IncrementalProjectBuilder.INCREMENTAL_BUILD, true, monitor); + // TODO, may need to get the buildReferences + // argument from the descriptor + } + return Status.OK_STATUS; + } catch (CoreException e) { + return e.getStatus(); + } + } + }.schedule(); + + return Status.OK_STATUS; + } + }.schedule(); + + } catch (CoreException e) { + return e.getStatus(); + } + return Status.OK_STATUS; + } + + protected Collection getProjects(ILaunchConfiguration config) { + Set projects = new HashSet<>(); + + if (config != null) { + IResource[] mappedResources; + try { + mappedResources = config.getMappedResources(); + } catch (CoreException e) { + return projects; + } + if (mappedResources != null) { + for (IResource resource : mappedResources) { + IProject project = resource.getProject(); + if (projects.contains(project)) + continue; + projects.add(project); + try { + projects.addAll(Arrays.asList(project.getReferencedProjects())); + } catch (CoreException e) { + // skip + } + } + } + } + + return projects; + } + + protected Collection getBuildConfigs(Collection projects) { + Set configs = new HashSet<>(); + + for (IProject project : projects) { + try { + configs.add(project.getActiveBuildConfig()); + } catch (CoreException e) { + // skip + } + } + + return configs; + } + + protected void saveEditors(final Collection projects) { + Display.getDefault().syncExec(() -> { + IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows(); + for (IWorkbenchWindow window : windows) { + IWorkbenchPage[] pages = window.getPages(); + for (IWorkbenchPage page : pages) { + if (projects.isEmpty()) { + page.saveAllEditors(false); + } else { + IEditorPart[] editors = page.getDirtyEditors(); + for (IEditorPart editor : editors) { + IFile inputFile = ResourceUtil.getFile(editor.getEditorInput()); + if (inputFile != null) { + if (projects.contains(inputFile.getProject())) { + page.saveEditor(editor, false); + } + } + } + } + } + } + }); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java new file mode 100644 index 00000000000..43e7c9ee97d --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/ConfigureActiveLaunchHandler.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2014,2016 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.core.ILaunchDescriptor; +import org.eclipse.launchbar.ui.ILaunchBarUIManager; +import org.eclipse.launchbar.ui.internal.Activator; + +public class ConfigureActiveLaunchHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ILaunchBarManager launchBarManager = Activator.getService(ILaunchBarManager.class); + ILaunchDescriptor launchDesc = launchBarManager.getActiveLaunchDescriptor(); + ILaunchBarUIManager uiManager = Activator.getService(ILaunchBarUIManager.class); + return uiManager.openConfigurationEditor(launchDesc); + } catch (CoreException e) { + return e.getStatus(); + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/LaunchActiveCommandHandler.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/LaunchActiveCommandHandler.java new file mode 100644 index 00000000000..799a0c8a383 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/LaunchActiveCommandHandler.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Status; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchMode; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.ui.internal.Activator; + +public class LaunchActiveCommandHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ILaunchBarManager launchBarManager = Activator.getService(ILaunchBarManager.class); + StopActiveCommandHandler.stopActiveLaunches(launchBarManager); + ILaunchConfiguration config = launchBarManager.getActiveLaunchConfiguration(); + if (config == null) { + return Status.OK_STATUS; + } + + ILaunchMode launchMode = launchBarManager.getActiveLaunchMode(); + if (launchMode == null) { + return Status.OK_STATUS; + } + DebugUITools.launch(config, launchMode.getIdentifier()); + + return Status.OK_STATUS; + } catch (CoreException e) { + return e.getStatus(); + } + } + + protected String getMode(ILaunchMode launchMode) { + return launchMode.getIdentifier(); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java new file mode 100644 index 00000000000..8ab0ebd033a --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/commands/StopActiveCommandHandler.java @@ -0,0 +1,107 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.IJobManager; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.launchbar.core.ILaunchBarManager; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.internal.Messages; + +public class StopActiveCommandHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + stop(); + return null; + } + + public void stop() { + stopBuild(); + stopActiveLaunches(Activator.getService(ILaunchBarManager.class)); + } + + static void stopActiveLaunches(ILaunchBarManager launchBarManager) { + final ILaunch[] activeLaunches = DebugPlugin.getDefault().getLaunchManager().getLaunches(); + if (activeLaunches != null && activeLaunches.length > 0) { + new Job(Messages.StopActiveCommandHandler_0) { + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + ILaunchConfiguration activeConfig = launchBarManager.getActiveLaunchConfiguration(); + if (activeConfig == null) { + return Status.OK_STATUS; + } + for (ILaunch launch : activeLaunches) { + if (launch.canTerminate()) { + ILaunchConfiguration launchConfig = launch.getLaunchConfiguration(); + if (activeConfig.equals(launchConfig)) { + launch.terminate(); + continue; + } + if (launchConfig instanceof ILaunchConfigurationWorkingCopy) { + // There are evil delegates that use a + // working copy for scratch storage + if (activeConfig + .equals(((ILaunchConfigurationWorkingCopy) launchConfig).getOriginal())) { + launch.terminate(); + continue; + } + } + } + } + return Status.OK_STATUS; + } catch (CoreException e) { + return e.getStatus(); + } + } + }.schedule(); + } + } + + protected void stopBuild() { + Job job = new Job(Messages.StopActiveCommandHandler_1) { + @Override + protected IStatus run(IProgressMonitor progress) { + // stops all builds + final IJobManager jobManager = Job.getJobManager(); + Job[] jobs = jobManager.find(ResourcesPlugin.FAMILY_MANUAL_BUILD); + for (int i = 0; i < jobs.length; i++) { + Job job = jobs[i]; + job.cancel(); + } + jobs = jobManager.find(ResourcesPlugin.FAMILY_AUTO_BUILD); + for (int i = 0; i < jobs.length; i++) { + Job job = jobs[i]; + job.cancel(); + } + return Status.OK_STATUS; + } + }; + job.schedule(); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigEditPage.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigEditPage.java new file mode 100644 index 00000000000..2f825ee02bd --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigEditPage.java @@ -0,0 +1,223 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.dialogs; + +import java.lang.reflect.InvocationTargetException; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.internal.ui.DebugUIPlugin; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationDialog; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog; +import org.eclipse.debug.internal.ui.launchConfigurations.LaunchGroupExtension; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.dialogs.IPageChangingListener; +import org.eclipse.jface.dialogs.PageChangingEvent; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; + +@SuppressWarnings("restriction") +public class NewLaunchConfigEditPage extends WizardPage implements IPageChangingListener { + private ILaunchConfigurationWorkingCopy workingCopy; + private LaunchConfigurationDialogExt launchConfigurationDialog = new LaunchConfigurationDialogExt(); + private LaunchConfigurationTabGroupViewerExt tabViewer; + + private ILaunchGroup launchGroup; + private ILaunchConfigurationType launchConfigType; + + public NewLaunchConfigEditPage() { + super(Messages.NewLaunchConfigEditPage_0); + setTitle(Messages.NewLaunchConfigEditPage_1); + setDescription(Messages.NewLaunchConfigEditPage_2); + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + comp.setLayout(new GridLayout(1, false)); + setControl(comp); + // create tab viewer + LaunchConfigurationsDialog.setCurrentlyVisibleLaunchConfigurationDialog(launchConfigurationDialog); + tabViewer = new LaunchConfigurationTabGroupViewerExt(comp, launchConfigurationDialog); + launchConfigurationDialog.setTabViewer(tabViewer); + GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false); + data.heightHint = 500; + tabViewer.getControl().setLayoutData(data); + parent.layout(true, true); + validateFields(); + } + + public void setLaunchGroup(ILaunchGroup launchGroup) { + this.launchGroup = launchGroup; + } + + public void setLaunchConfigType(ILaunchConfigurationType type) { + this.launchConfigType = type; + } + + /** + * @return the workingCopy + */ + public ILaunchConfigurationWorkingCopy getWorkingCopy() { + return workingCopy; + } + + @Override + public void handlePageChanging(PageChangingEvent event) { + if (launchConfigType == null || event.getTargetPage() != this) { + if (tabViewer != null) + tabViewer.setInput(null); + return; + } + LaunchConfigurationsDialog.setCurrentlyVisibleLaunchConfigurationDialog(launchConfigurationDialog); + if (tabViewer != null) { + try { + String name = launchConfigurationDialog.generateName("launchConfiguration"); //$NON-NLS-1$ + workingCopy = launchConfigType.newInstance(null, name); + launchConfigurationDialog.doSetDefaults(workingCopy); + tabViewer.setInput(workingCopy); + setTitle(String.format(Messages.NewLaunchConfigEditPage_7, launchConfigType.getName())); + } catch (CoreException e) { + Activator.log(e); + } + } + } + + public boolean performFinish() { + if (workingCopy == null) + return false; + workingCopy.rename(tabViewer.getWorkingCopy().getName()); + tabViewer.getTabGroup().performApply(workingCopy); + LaunchConfigurationsDialog.setCurrentlyVisibleLaunchConfigurationDialog(null); + return true; + } + + @Override + public void dispose() { + LaunchConfigurationsDialog.setCurrentlyVisibleLaunchConfigurationDialog(null); + } + + public void validateFields() { + // page is not complete unless we finish validation successfully + setPageComplete(false); + if (workingCopy == null) + return; + String message = tabViewer.getErrorMesssage(); + setErrorMessage(message); + if (getErrorMessage() != null) { + setPageComplete(false); + } else { + setPageComplete(true); + } + } + + private class LaunchConfigurationDialogExt extends LaunchConfigurationDialog { + public LaunchConfigurationDialogExt() { + super(NewLaunchConfigEditPage.this.getShell(), null, null); + } + + @Override + protected ILaunchConfiguration getLaunchConfiguration() { + return workingCopy; + } + + @Override + public void launchConfigurationAdded(ILaunchConfiguration configuration) { + if (getLaunchConfiguration() == null) + return; + super.launchConfigurationAdded(configuration); + } + + @Override + public LaunchGroupExtension getLaunchGroup() { + return NewLaunchConfigEditPage.this.getLaunchGroup(); + } + + @Override + public void updateMessage() { + validateFields(); + } + + @Override + public void updateButtons() { + // Launch button + getTabViewer().refresh(); + // getButton(ID_LAUNCH_BUTTON).setEnabled(getTabViewer().canLaunch() + // & getTabViewer().canLaunchWithModes() & + // !getTabViewer().hasDuplicateDelegates()); + } + + @Override + public void run(boolean fork, boolean cancelable, IRunnableWithProgress runnable) + throws InvocationTargetException, InterruptedException { + // ignore + } + + @Override + public String generateName(String name) { + if (name == null) + return ""; //$NON-NLS-1$ + return DebugPlugin.getDefault().getLaunchManager().generateLaunchConfigurationName(name); + } + + @Override + public void doSetDefaults(ILaunchConfigurationWorkingCopy wc) { + super.doSetDefaults(wc); + } + + @Override + public void setTabViewer(LaunchConfigurationTabGroupViewer viewer) { + super.setTabViewer(viewer); + } + + @Override + public boolean isTreeSelectionEmpty() { + return false; + } + } + + private class LaunchConfigurationTabGroupViewerExt extends LaunchConfigurationTabGroupViewer { + public LaunchConfigurationTabGroupViewerExt(Composite parent, ILaunchConfigurationDialog dialog) { + super(parent, dialog); + } + + @Override + public ILaunchConfigurationWorkingCopy getWorkingCopy() { + return super.getWorkingCopy(); + } + } + + public LaunchGroupExtension getLaunchGroup() { + if (workingCopy == null) + return null; + if (launchGroup == null) { + return null; + } + LaunchGroupExtension groupExt = DebugUIPlugin.getDefault().getLaunchConfigurationManager() + .getLaunchGroup(launchGroup.getIdentifier()); + return groupExt; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigModePage.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigModePage.java new file mode 100644 index 00000000000..c6e10f0446e --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigModePage.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.dialogs; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; + +public class NewLaunchConfigModePage extends WizardPage { + + private Table table; + + public NewLaunchConfigModePage() { + super(Messages.NewLaunchConfigModePage_0); + setTitle(Messages.NewLaunchConfigModePage_1); + setDescription(Messages.NewLaunchConfigModePage_2); + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + comp.setLayout(new GridLayout(1, false)); + + table = new Table(comp, SWT.SINGLE | SWT.BORDER); + GridData data = new GridData(SWT.FILL, SWT.FILL, true, true); + table.setLayoutData(data); + + Set done = new HashSet<>(); + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (group.getMode().equals("run")) { //$NON-NLS-1$ + createModeItem(group); + done.add(group); + } + } + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (group.getMode().equals("debug")) { //$NON-NLS-1$ + createModeItem(group); + done.add(group); + } + } + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (!done.contains(group)) { + createModeItem(group); + } + } + + if (table.getItemCount() > 0) { + // Select debug as default + int i = 0; + boolean hasDebug = false; + for (TableItem item : table.getItems()) { + if ("debug".equals(((ILaunchGroup) item.getData()).getMode())) { //$NON-NLS-1$ + hasDebug = true; + table.select(i); + break; + } + i++; + } + + if (!hasDebug) { + table.select(0); + } + + // We're guaranteed to have made a selection here + table.notifyListeners(SWT.Selection, null); + } + + setControl(comp); + } + + private void createModeItem(ILaunchGroup group) { + if (group.getCategory() != null || !group.isPublic()) + return; + + TableItem item = new TableItem(table, SWT.NONE); + item.setText(group.getLabel().replace("&", "")); //$NON-NLS-1$ //$NON-NLS-2$ + ImageDescriptor imageDesc = group.getImageDescriptor(); + if (imageDesc != null) { + item.setImage(imageDesc.createImage()); + } + item.setData(group); + } + + public ILaunchGroup getSelectedGroup() { + return (ILaunchGroup) table.getSelection()[0].getData(); + } + + public void addGroupSelectionListener(SelectionListener listener) { + table.addSelectionListener(listener); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage.java new file mode 100644 index 00000000000..4bafe25a2b9 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright (c) 2014 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Doug Schaefer + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.dialogs; + +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; + +public class NewLaunchConfigTypePage extends WizardPage { + private Table table; + + public NewLaunchConfigTypePage() { + super(Messages.NewLaunchConfigTypePage_0); + setTitle(Messages.NewLaunchConfigTypePage_1); + setDescription(Messages.NewLaunchConfigTypePage_2); + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + comp.setLayout(new GridLayout(1, false)); + + table = new Table(comp, SWT.SINGLE | SWT.BORDER); + GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); + data.heightHint = 500; + table.setLayoutData(data); + table.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetDefaultSelected(SelectionEvent e) { + getContainer().showPage(getNextPage()); + } + }); + + setControl(comp); + } + + public void setLaunchGroup(ILaunchGroup group) { + if (group == null) + return; + + table.removeAll(); + + boolean haveItems = false; + for (ILaunchConfigurationType type : DebugPlugin.getDefault().getLaunchManager() + .getLaunchConfigurationTypes()) { + if (!type.isPublic() || type.getCategory() != null || !type.supportsMode(group.getMode())) + continue; + + haveItems = true; + TableItem item = new TableItem(table, SWT.NONE); + item.setText(type.getName()); + ImageDescriptor imageDesc = DebugUITools.getDefaultImageDescriptor(type); + if (imageDesc != null) + item.setImage(imageDesc.createImage()); + item.setData(type); + } + + if (haveItems) { + table.select(0); + table.notifyListeners(SWT.Selection, null); + } + setPageComplete(haveItems); + } + + public void addTypeSelectionListener(SelectionListener listener) { + table.addSelectionListener(listener); + } + + public ILaunchConfigurationType getSelectedType() { + return (ILaunchConfigurationType) table.getSelection()[0].getData(); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage2.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage2.java new file mode 100644 index 00000000000..0a3e1bd8a01 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/dialogs/NewLaunchConfigTypePage2.java @@ -0,0 +1,199 @@ +/******************************************************************************* + * Copyright (c) 2017, 2018 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.dialogs; + +import java.util.Arrays; + +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.ui.DebugUITools; +import org.eclipse.debug.ui.ILaunchGroup; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; + +public class NewLaunchConfigTypePage2 extends WizardPage { + + private final NewLaunchConfigEditPage editPage; + + private Table modeTable; + private Table typeTable; + + public NewLaunchConfigTypePage2(NewLaunchConfigEditPage editPage) { + super(NewLaunchConfigTypePage2.class.getName()); + this.editPage = editPage; + setTitle(Messages.NewLaunchConfigTypePage_1); + setDescription(Messages.NewLaunchConfigTypePage_2); + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + comp.setLayout(new GridLayout()); + + Group modeGroup = new Group(comp, SWT.NONE); + modeGroup.setText(Messages.NewLaunchConfigTypePage2_Mode); + modeGroup.setLayout(new GridLayout()); + modeGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + modeTable = new Table(modeGroup, SWT.SINGLE | SWT.BORDER); + GridData data = new GridData(SWT.FILL, SWT.FILL, true, false); + data.heightHint = 100; + modeTable.setLayoutData(data); + modeTable.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + modeChanged(); + } + }); + + Group typeGroup = new Group(comp, SWT.NONE); + typeGroup.setText(Messages.NewLaunchConfigTypePage2_Type); + typeGroup.setLayout(new GridLayout()); + typeGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + typeTable = new Table(typeGroup, SWT.SINGLE | SWT.BORDER); + typeTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + typeTable.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + typeChanged(); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + widgetSelected(e); + getContainer().showPage(getNextPage()); + } + }); + + populateMode(); + + setControl(comp); + } + + private void populateMode() { + int select = -1; + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (group.getMode().equals("run")) { //$NON-NLS-1$ + if (createModeItem(modeTable, group)) { + select++; + } + } + } + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (group.getMode().equals("debug")) { //$NON-NLS-1$ + if (createModeItem(modeTable, group)) { + select++; + } + } + } + + for (ILaunchGroup group : DebugUITools.getLaunchGroups()) { + if (!group.getMode().equals("run") && !group.getMode().equals("debug")) { //$NON-NLS-1$ //$NON-NLS-2$ + createModeItem(modeTable, group); + } + } + + if (select >= 0) { + modeTable.select(select); + modeChanged(); + } else if (modeTable.getItemCount() > 0) { + modeTable.select(0); + modeChanged(); + } else { + setPageComplete(false); + } + } + + private boolean createModeItem(Table table, ILaunchGroup group) { + if (group.getCategory() != null || !group.isPublic()) + return false; + + TableItem item = new TableItem(table, SWT.NONE); + item.setText(group.getLabel().replace("&", "")); //$NON-NLS-1$ //$NON-NLS-2$ + ImageDescriptor imageDesc = group.getImageDescriptor(); + if (imageDesc != null) { + item.setImage(imageDesc.createImage()); + } + item.setData(group); + + return true; + } + + private void modeChanged() { + TableItem[] selection = modeTable.getSelection(); + if (selection.length == 0) { + editPage.setLaunchGroup(null); + setPageComplete(false); + return; + } + + ILaunchGroup group = (ILaunchGroup) selection[0].getData(); + editPage.setLaunchGroup(group); + + ILaunchConfigurationType[] types = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes(); + Arrays.sort(types, (type0, type1) -> { + int comp = type0.getPluginIdentifier().compareTo(type1.getPluginIdentifier()); + if (comp != 0) { + return comp; + } else { + return type0.getName().compareTo(type1.getName()); + } + }); + + typeTable.removeAll(); + for (ILaunchConfigurationType type : types) { + if (!type.isPublic() || type.getCategory() != null || !type.supportsMode(group.getMode())) + continue; + + TableItem item = new TableItem(typeTable, SWT.NONE); + item.setText(type.getName()); + ImageDescriptor imageDesc = DebugUITools.getDefaultImageDescriptor(type); + if (imageDesc != null) + item.setImage(imageDesc.createImage()); + item.setData(type); + } + + if (typeTable.getItemCount() > 0) { + typeTable.select(0); + typeChanged(); + } else { + setPageComplete(false); + } + } + + private void typeChanged() { + TableItem[] selection = typeTable.getSelection(); + if (selection.length == 0) { + editPage.setLaunchConfigType(null); + setPageComplete(false); + return; + } + + ILaunchConfigurationType type = (ILaunchConfigurationType) selection[0].getData(); + editPage.setLaunchConfigType(type); + setPageComplete(true); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties new file mode 100644 index 00000000000..3c8291f53d6 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/messages.properties @@ -0,0 +1,66 @@ +################################################################################ +# Copyright (c) 2016 QNX Software Systems and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +################################################################################ +BuildActiveCommandHandler_0=Building Active Configuration +BuildActiveCommandHandler_1=Building Active Configuration +StopActiveCommandHandler_0=Stopping launches +StopActiveCommandHandler_1=Stopping build + +NewLaunchConfigEditPage_0=NewLaunchConfigEditPage +NewLaunchConfigEditPage_1=Launch Configuration Properties +NewLaunchConfigEditPage_2=Edit the new launch configuration properties +NewLaunchConfigEditPage_3=Name +NewLaunchConfigEditPage_4=Name can not be empty +NewLaunchConfigEditPage_5=A configuration with this name already exists +NewLaunchConfigEditPage_6=New Configuration +NewLaunchConfigEditPage_7=%s Launch Configuration Properties +NewLaunchConfigModePage_0=Select Initial Launch Mode +NewLaunchConfigModePage_1=Initial Launch Mode +NewLaunchConfigModePage_2=Select initial launch mode. +NewLaunchConfigTypePage_0=Select Launch Configuration Type +NewLaunchConfigTypePage_1=Launch Configuration Type +NewLaunchConfigTypePage_2=Select the mode and type of the launch configuration to create. +NewLaunchConfigTypePage2_Mode=Launch Mode +NewLaunchConfigTypePage2_Type=Launch Configuration Type +NewLaunchConfigWizard_0=Create Launch Configuration +NewLaunchTargetWizard_Title=New Launch Target +NewLaunchTargetWizardSelectionPage_Description=Select the type of target to create. +NewLaunchTargetWizardSelectionPage_Title=New Launch Target + +DescriptorMustNotBeNull=Descriptor must not be null +DescriptorMustNotBeNullDesc=The launch descriptor must not be null. +NoActiveTarget=No Active Target +NoActiveTargetDesc=You must create a target to edit this launch configuration. +NoLaunchConfigType=No launch configuration type matches selected launch descriptor. +CannotEditLaunchConfiguration=Cannot edit this configuration. +NoLaunchModeSelected=No launch mode selected. +NoLaunchGroupSelected=No launch group found for the current selection. + +LaunchBarLaunchConfigDialog_Edit1=Edit %s configuration %s for %s +LaunchBarLaunchConfigDialog_Edit2=Edit %s configuration %s for %s on %s +LaunchBarLaunchConfigDialog_EditConfiguration=Edit Configuration +LaunchBarLaunchConfigDialog_LaunchConfigName=Launch Configuration Name: +LaunchBarLaunchConfigDialog_LCMustHaveName=Launch configuration must have a name +LaunchBarLaunchConfigDialog_LCNameExists=A launch configuration with that name already exists. +LaunchBarLaunchConfigDialog_LCNameNotValid=The launch configuration name is not valid. +LaunchBarLaunchConfigDialog_SetParameters=Set parameters for the configuration. +LaunchBarLaunchConfigDialog_Duplicate=Duplicate +LaunchBarLaunchConfigDialog_Delete=Delete +LaunchBarLaunchConfigDialog_Reset=Restore Defaults +LaunchBarLaunchConfigDialog_DeleteTitle=Delete Launch Configuration +LaunchBarLaunchConfigDialog_ResetTitle=Restore Launch Configuration Defaults +LaunchBarLaunchConfigDialog_DeleteConfirm=Are you sure you would like to delete %s +LaunchBarLaunchConfigDialog_ResetConfirm=Are you sure you want to restore defaults on %s + +LaunchConfigurationNotFound=Launch Configuration Not Found +LaunchConfigurationNotFoundDesc=No launch configuration is found for the given launch descriptor and target. +LaunchTargetWizardDialog_Delete=Delete +NoLaunchTabsDefined=No launch tabs defined. +NoLaunchTabsDefinedDesc=No launch tabs have been defined for this launch configuration type. diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetUIManager.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetUIManager.java new file mode 100644 index 00000000000..9b1acdbe237 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetUIManager.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.target; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.IExtensionRegistry; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.window.SameShellProvider; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.target.ILaunchTargetUIManager; +import org.eclipse.launchbar.ui.target.LaunchTargetWizard; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.PropertyDialogAction; +import org.eclipse.ui.wizards.IWizardDescriptor; + +public class LaunchTargetUIManager implements ILaunchTargetUIManager { + private Map typeElements; + private Map labelProviders = new HashMap<>(); + private Map editElements; + + @Override + public synchronized ILabelProvider getLabelProvider(ILaunchTarget target) { + if (typeElements == null) { + // Load them up + typeElements = new HashMap<>(); + IExtensionRegistry registry = Platform.getExtensionRegistry(); + IExtensionPoint point = registry + .getExtensionPoint(Activator.getDefault().getBundle().getSymbolicName() + ".launchTargetTypeUI"); //$NON-NLS-1$ + for (IExtension extension : point.getExtensions()) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + if ("launchTargetTypeUI".equals(element.getName())) { //$NON-NLS-1$ + String id = element.getAttribute("id"); //$NON-NLS-1$ + if (id != null) { + typeElements.put(id, element); + } + } + } + } + } + + String typeId = target.getTypeId(); + ILabelProvider labelProvider = labelProviders.get(typeId); + if (labelProvider == null) { + IConfigurationElement element = typeElements.get(typeId); + if (element != null) { + try { + labelProvider = (ILabelProvider) element.createExecutableExtension("labelProvider"); //$NON-NLS-1$ + } catch (CoreException e) { + Activator.log(e); + } + } + if (labelProvider == null) { + labelProvider = new LabelProvider() { + @Override + public String getText(Object element) { + if (element instanceof ILaunchTarget) { + return ((ILaunchTarget) element).getId(); + } + return super.getText(element); + } + + @Override + public Image getImage(Object element) { + if (element instanceof ILaunchTarget) { + return Activator.getDefault().getImage(Activator.IMG_LOCAL_TARGET); + } + return super.getImage(element); + } + }; + } + } + return labelProvider; + } + + @Override + public IWizardDescriptor[] getLaunchTargetWizards() { + // No one one should be using this. The new target wizard is internal. + return null; + } + + @Override + public void editLaunchTarget(ILaunchTarget target) { + if (editElements == null) { + // Load them up + editElements = new HashMap<>(); + IExtensionRegistry registry = Platform.getExtensionRegistry(); + IExtensionPoint point = registry + .getExtensionPoint(Activator.getDefault().getBundle().getSymbolicName() + ".launchTargetTypeUI"); //$NON-NLS-1$ + for (IExtension extension : point.getExtensions()) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + if ("wizard2".equals(element.getName())) { //$NON-NLS-1$ + String id = element.getAttribute("id"); //$NON-NLS-1$ + if (id != null) { + editElements.put(id, element); + } + } + } + } + } + + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(); + IConfigurationElement element = editElements.get(target.getTypeId()); + if (element != null) { + try { + LaunchTargetWizard wizard = (LaunchTargetWizard) element.createExecutableExtension("class"); //$NON-NLS-1$ + wizard.setLaunchTarget(target); + WizardDialog dialog = wizard.canDelete() ? new LaunchTargetWizardDialog(shell, wizard) + : new WizardDialog(shell, wizard); + dialog.open(); + } catch (CoreException e) { + Activator.log(e.getStatus()); + } + } else { + new PropertyDialogAction(new SameShellProvider(shell), new ISelectionProvider() { + @Override + public void setSelection(ISelection selection) { + // ignore + } + + @Override + public void removeSelectionChangedListener(ISelectionChangedListener listener) { + // ignore + } + + @Override + public ISelection getSelection() { + return new StructuredSelection(target); + } + + @Override + public void addSelectionChangedListener(ISelectionChangedListener listener) { + // ignore + } + }).run(); + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetWizardDialog.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetWizardDialog.java new file mode 100644 index 00000000000..0dd5c6841a8 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/LaunchTargetWizardDialog.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.target; + +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.launchbar.ui.target.LaunchTargetWizard; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; + +public class LaunchTargetWizardDialog extends WizardDialog { + + public static final int ID_DELETE = IDialogConstants.CLIENT_ID + 0; + + public LaunchTargetWizardDialog(Shell parentShell, IWizard newWizard) { + super(parentShell, newWizard); + } + + @Override + protected void createButtonsForButtonBar(Composite parent) { + createButton(parent, ID_DELETE, Messages.LaunchTargetWizardDialog_Delete, false); + + super.createButtonsForButtonBar(parent); + } + + @Override + protected void buttonPressed(int buttonId) { + if (buttonId == ID_DELETE) { + ((LaunchTargetWizard) getWizard()).performDelete(); + setReturnCode(CANCEL); + close(); + } else { + super.buttonPressed(buttonId); + } + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizard.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizard.java new file mode 100644 index 00000000000..eaf04caefcb --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizard.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright (c) 2000, 2015 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.target; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.launchbar.ui.internal.Messages; + +/** + * The new wizard is responsible for allowing the user to choose which new + * (nested) wizard to run. The set of available new wizards comes from the new + * extension point. + */ +public class NewLaunchTargetWizard extends Wizard { + + public NewLaunchTargetWizard() { + setForcePreviousAndNextButtons(true); + } + + /** + * Create the wizard pages + */ + @Override + public void addPages() { + addPage(new NewLaunchTargetWizardSelectionPage()); + setWindowTitle(Messages.NewLaunchTargetWizard_Title); + } + + @Override + public boolean performFinish() { + // Downstream wizards do finish + return false; + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizardSelectionPage.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizardSelectionPage.java new file mode 100644 index 00000000000..4ee6c8d59de --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/internal/target/NewLaunchTargetWizardSelectionPage.java @@ -0,0 +1,166 @@ +/******************************************************************************* + * Copyright (c) 2000, 2018 IBM Corporation and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.launchbar.ui.internal.target; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.IExtensionPoint; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.wizard.IWizardPage; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardPage; +import org.eclipse.launchbar.ui.internal.Activator; +import org.eclipse.launchbar.ui.internal.Messages; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.ui.IWorkbenchWizard; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.plugin.AbstractUIPlugin; + +class NewLaunchTargetWizardSelectionPage extends WizardPage { + + private Table table; + + public NewLaunchTargetWizardSelectionPage() { + super(NewLaunchTargetWizardSelectionPage.class.getName()); + setTitle(Messages.NewLaunchTargetWizardSelectionPage_Title); + setDescription(Messages.NewLaunchTargetWizardSelectionPage_Description); + } + + @Override + public void createControl(Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + comp.setLayout(new GridLayout()); + + table = new Table(comp, SWT.BORDER | SWT.SINGLE); + table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + List elements = new ArrayList<>(); + IExtensionPoint point = Platform.getExtensionRegistry() + .getExtensionPoint(Activator.PLUGIN_ID + ".launchTargetTypeUI"); //$NON-NLS-1$ + for (IExtension extension : point.getExtensions()) { + for (IConfigurationElement element : extension.getConfigurationElements()) { + String elementName = element.getName(); + if ("wizard2".equals(elementName) || "wizard".equals(elementName)) { //$NON-NLS-1$ //$NON-NLS-2$ + elements.add(element); + } + } + } + + elements.sort((o1, o2) -> { + String name1 = o1.getAttribute("name"); //$NON-NLS-1$ + String name2 = o2.getAttribute("name"); //$NON-NLS-1$ + return name1.compareTo(name2); + }); + + for (IConfigurationElement element : elements) { + String name = element.getAttribute("name"); //$NON-NLS-1$ + TableItem item = new TableItem(table, SWT.NONE); + item.setText(name); + + String iconFile = element.getAttribute("icon"); //$NON-NLS-1$ + if (iconFile != null) { + ImageDescriptor desc = Activator.imageDescriptorFromPlugin(element.getNamespaceIdentifier(), iconFile); + if (desc != null) { + item.setImage(desc.createImage()); + } + } + + item.setData(element); + } + + table.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + getContainer().updateButtons(); + } + + @Override + public void widgetDefaultSelected(SelectionEvent e) { + widgetSelected(e); + if (canFlipToNextPage()) { + getContainer().showPage(getNextPage()); + } + } + }); + + setControl(comp); + } + + @Override + public void dispose() { + for (TableItem item : table.getItems()) { + Object obj = item.getData(); + if (obj instanceof Wizard) { + ((Wizard) obj).dispose(); + } + } + super.dispose(); + } + + public ImageDescriptor getDescriptionImage(IConfigurationElement element) { + String descImage = element.getAttribute("icon"); //$NON-NLS-1$ + if (descImage == null) { + return null; + } + return AbstractUIPlugin.imageDescriptorFromPlugin(element.getNamespaceIdentifier(), descImage); + } + + @Override + public boolean canFlipToNextPage() { + return table.getSelectionIndex() >= 0; + } + + @Override + public IWizardPage getNextPage() { + int i = table.getSelectionIndex(); + if (i >= 0) { + TableItem item = table.getItem(i); + Object obj = item.getData(); + Wizard nextWizard; + if (obj instanceof IConfigurationElement) { + IConfigurationElement element = (IConfigurationElement) obj; + try { + nextWizard = (Wizard) element.createExecutableExtension("class"); //$NON-NLS-1$ + nextWizard.addPages(); + if (nextWizard instanceof IWorkbenchWizard) { + ((IWorkbenchWizard) nextWizard).init(PlatformUI.getWorkbench(), new StructuredSelection()); + } + item.setData(nextWizard); + } catch (CoreException e) { + Activator.log(e); + return null; + } + } else { + nextWizard = (Wizard) obj; + } + + return nextWizard.getStartingPage(); + } + return super.getNextPage(); + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/ILaunchTargetUIManager.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/ILaunchTargetUIManager.java new file mode 100644 index 00000000000..981f0e5b70b --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/ILaunchTargetUIManager.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright (c) 2015 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.target; + +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.launchbar.core.target.ILaunchTarget; +import org.eclipse.ui.wizards.IWizardDescriptor; + +/** + * A manager for the launch target UI. + */ +public interface ILaunchTargetUIManager { + + /** + * Return a label provider that gives the test and image for the target. + * + * @param target + * the launch target + * @return the label provider for the launch target + */ + ILabelProvider getLabelProvider(ILaunchTarget target); + + /** + * @deprecated this should never have been in the interface, now returns null + * @return null + */ + @Deprecated + public IWizardDescriptor[] getLaunchTargetWizards(); + + /** + * Open a dialog to edit the specified launch target. + * + * @param target + * launch target to edit + */ + void editLaunchTarget(ILaunchTarget target); + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/LaunchTargetWizard.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/LaunchTargetWizard.java new file mode 100644 index 00000000000..18aa90d7fce --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/LaunchTargetWizard.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.target; + +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.launchbar.core.target.ILaunchTarget; + +public abstract class LaunchTargetWizard extends Wizard { + + protected ILaunchTarget launchTarget; + + public void setLaunchTarget(ILaunchTarget launchTarget) { + this.launchTarget = launchTarget; + } + + public ILaunchTarget getLaunchTarget() { + return launchTarget; + } + + public boolean canDelete() { + return false; + } + + public void performDelete() { + // do nothing by default + } + +} diff --git a/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/NewLaunchTargetWizardAction.java b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/NewLaunchTargetWizardAction.java new file mode 100644 index 00000000000..49ff4025ab7 --- /dev/null +++ b/launchbar/org.eclipse.launchbar.ui/src/org/eclipse/launchbar/ui/target/NewLaunchTargetWizardAction.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright (c) 2017 QNX Software Systems and others. + * + * This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ +package org.eclipse.launchbar.ui.target; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.wizard.Wizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.launchbar.ui.internal.target.NewLaunchTargetWizard; +import org.eclipse.ui.PlatformUI; + +/** + * Open the new launch target wizard. + */ +public class NewLaunchTargetWizardAction extends Action { + + @Override + public void run() { + Wizard wizard = new NewLaunchTargetWizard(); + new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard).open(); + } + +} diff --git a/launchbar/org.eclipse.launchbar/.project b/launchbar/org.eclipse.launchbar/.project new file mode 100644 index 00000000000..493b389be33 --- /dev/null +++ b/launchbar/org.eclipse.launchbar/.project @@ -0,0 +1,17 @@ + + + org.eclipse.launchbar-feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/launchbar/org.eclipse.launchbar/build.properties b/launchbar/org.eclipse.launchbar/build.properties new file mode 100644 index 00000000000..ade11de0837 --- /dev/null +++ b/launchbar/org.eclipse.launchbar/build.properties @@ -0,0 +1,15 @@ +############################################################################### +# Copyright (c) 2014 QNX and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# QNX - initial API and implementation +############################################################################### +bin.includes = feature.xml,\ + feature.properties diff --git a/launchbar/org.eclipse.launchbar/feature.properties b/launchbar/org.eclipse.launchbar/feature.properties new file mode 100644 index 00000000000..abdbebf2f4b --- /dev/null +++ b/launchbar/org.eclipse.launchbar/feature.properties @@ -0,0 +1,36 @@ +############################################################################### +# Copyright (c) 2005, 2010 IBM Corporation and others. +# +# This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +# +# Contributors: +# IBM Corporation - initial API and implementation +############################################################################### +# features.properties +# contains externalized strings for feature.xml +# "%foo" in feature.xml corresponds to the key "foo" in this file +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. + +# "featureName" property - name of the feature +featureName=LaunchBar + +# "providerName" property - name of the company that provides the feature +providerName=Eclipse CDT + +# "description" property - description of the feature +description=A Tool Control that sits in the TOP trim bar that controls build and launch. + +# copyright +copyright=\ +Copyright (c) 2014 QNX Software Systems and others\n\ +This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License 2.0\n\ +which accompanies this distribution, and is available at\n\ +https://www.eclipse.org/legal/epl-2.0/ + diff --git a/launchbar/org.eclipse.launchbar/feature.xml b/launchbar/org.eclipse.launchbar/feature.xml new file mode 100644 index 00000000000..ac37d374229 --- /dev/null +++ b/launchbar/org.eclipse.launchbar/feature.xml @@ -0,0 +1,43 @@ + + + + + %description + + + + %copyright + + + + %license + + + + + + + + +