diff options
author | jonas | 2014-11-20 09:00:36 +0000 |
---|---|---|
committer | jonas | 2014-11-20 09:00:36 +0000 |
commit | dba6a2cd8251f22d67b0b8b3ce2c10edde85094c (patch) | |
tree | 9e6d4d2e797ceaf1913c22526896afb8fc6da1f3 /bundles | |
parent | e86ba403cabc4b9fe0df6beb62e9ca5b1d4fab19 (diff) | |
download | org.eclipse.e4.tools-dba6a2cd8251f22d67b0b8b3ce2c10edde85094c.tar.gz org.eclipse.e4.tools-dba6a2cd8251f22d67b0b8b3ce2c10edde85094c.tar.xz org.eclipse.e4.tools-dba6a2cd8251f22d67b0b8b3ce2c10edde85094c.zip |
Bug 444692 - Remove Warnings - applied proper settings for emf.ui bundleI20141122-2200I20141121-2200
Diffstat (limited to 'bundles')
17 files changed, 597 insertions, 304 deletions
diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..f548abbf --- /dev/null +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,6 @@ +eclipse.preferences.version=1 + +encoding//model/etypes.ecore=UTF-8 + + +encoding/<project>=UTF-8 diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs index fa824f42..c9482977 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,29 @@ 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= +org.eclipse.jdt.core.circularClasspath=error +org.eclipse.jdt.core.classpath.exclusionPatterns=enabled +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.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve @@ -6,6 +31,8 @@ org.eclipse.jdt.core.compiler.compliance=1.6 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.annotationSuperInterface=warning org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.autoboxing=ignore @@ -13,50 +40,79 @@ 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=ignore -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning org.eclipse.jdt.core.compiler.problem.forbiddenReference=error org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +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=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=warning org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=warning org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +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=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=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.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.unnecessaryElse=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled @@ -71,30 +127,38 @@ org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference= 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.source=1.6 +org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled +org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH,LOW,LOW,LOW,LOW,LOW,NORMAL +org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,PERF,MEM,POLISH,@generated NOT,@ADDED,APITODO org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=0 +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=0 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=0 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=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_conditional_expression=80 org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=0 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=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_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 @@ -117,10 +181,10 @@ org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=true org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_header=true org.eclipse.jdt.core.formatter.comment.format_html=true org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true org.eclipse.jdt.core.formatter.comment.format_line_comments=true @@ -128,12 +192,18 @@ org.eclipse.jdt.core.formatter.comment.format_source_code=true org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true org.eclipse.jdt.core.formatter.comment.indent_root_tags=true org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=120 +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.continuation_indentation=1 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=1 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true @@ -151,6 +221,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert @@ -217,12 +288,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invoca 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 @@ -246,6 +319,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invoc 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 @@ -301,6 +375,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invoc 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 @@ -310,6 +385,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=inser 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 @@ -319,13 +395,13 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_ 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.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=80 +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 @@ -333,5 +409,10 @@ org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true org.eclipse.jdt.core.formatter.tabulation.char=tab org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false org.eclipse.jdt.core.formatter.wrap_before_binary_operator=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 diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.launching.prefs new file mode 100644 index 00000000..3bb23527 --- /dev/null +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.launching.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=ignore diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs index d4d8200d..791508d1 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.jdt.ui.prefs @@ -1,11 +1,66 @@ +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_to_enhanced_for_loop=false +cleanup.correct_indentation=true +cleanup.format_source_code=true +cleanup.format_source_code_changes_only=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=true +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=true +cleanup.qualify_static_method_accesses_with_declaring_class=false +cleanup.remove_private_constructors=true +cleanup.remove_trailing_whitespaces=true +cleanup.remove_trailing_whitespaces_all=true +cleanup.remove_trailing_whitespaces_ignore_empty=false +cleanup.remove_unnecessary_casts=false +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_blocks=true +cleanup.use_blocks_only_for_return_and_throw=false +cleanup.use_parentheses_in_expressions=true +cleanup.use_this_for_non_static_field_access=true +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=true +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_esmCleanUp +cleanup_settings_version=2 eclipse.preferences.version=1 editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_custom -formatter_settings_version=11 -org.eclipse.jdt.ui.ignorelowercasenames=true -org.eclipse.jdt.ui.importorder=; -org.eclipse.jdt.ui.ondemandthreshold=99 -org.eclipse.jdt.ui.staticondemandthreshold=99 +formatter_profile=_esmFormatter +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=ex +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.javadoc=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\r\n * Copyright (c) 2011-${year} EclipseSource Muenchen GmbH and others.\r\n * \r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n * \r\n * Contributors\:\r\n * ${user} - initial API and implementation\r\n ******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment"/><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">\t\t\t// TODO Auto-generated catch block\r\n\t\t\t// Do NOT catch all Exceptions ("catch (Exception e)")\r\n\t\t\t// Log AND handle Exceptions if possible \r\n //\r\n // You can just uncomment one of the lines below to log an exception\:\r\n\t\t\t// logException will show the logged excpetion to the user\r\n\t\t\t// ModelUtil.logException(${exception_var});\r\n\t\t\t// ModelUtil.logException("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// logWarning will only add the message to the error log\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE", ${exception_var});\r\n\t\t\t// ModelUtil.logWarning("YOUR MESSAGE HERE");\r\n\t\t\t//\t\t\t\r\n\t\t\t// If handling is not possible declare and rethrow Exception</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> sp_cleanup.add_default_serial_version_id=true sp_cleanup.add_generated_serial_version_id=false sp_cleanup.add_missing_annotations=true @@ -20,14 +75,14 @@ sp_cleanup.always_use_parentheses_in_expressions=false sp_cleanup.always_use_this_for_non_static_field_access=false sp_cleanup.always_use_this_for_non_static_method_access=false sp_cleanup.convert_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false +sp_cleanup.correct_indentation=true sp_cleanup.format_source_code=true sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=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.make_variable_declarations_final=true sp_cleanup.never_use_blocks=false sp_cleanup.never_use_parentheses_in_expressions=true sp_cleanup.on_save_use_additional_actions=true @@ -35,15 +90,15 @@ 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_member_accesses_with_declaring_class=true sp_cleanup.qualify_static_method_accesses_with_declaring_class=false sp_cleanup.remove_private_constructors=true sp_cleanup.remove_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=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=true +sp_cleanup.remove_unused_imports=true sp_cleanup.remove_unused_local_variables=false sp_cleanup.remove_unused_private_fields=true sp_cleanup.remove_unused_private_members=false @@ -51,10 +106,10 @@ sp_cleanup.remove_unused_private_methods=true sp_cleanup.remove_unused_private_types=true sp_cleanup.sort_members=false sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=false +sp_cleanup.use_blocks=true sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_parentheses_in_expressions=true +sp_cleanup.use_this_for_non_static_field_access=true 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=true sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.api.tools.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 00000000..e4e3c007 --- /dev/null +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,97 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=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_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=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 +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=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_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=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_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_JAVADOC_TAG=Warning +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Error +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=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_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Error +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=Ignore +automatically_removed_unused_problem_filters=Disabled +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 +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/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.prefs new file mode 100644 index 00000000..0bbee3c4 --- /dev/null +++ b/bundles/org.eclipse.e4.tools.emf.ui/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +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=1 +compilers.p.missing-version-export-package=1 +compilers.p.missing-version-import-package=1 +compilers.p.missing-version-require-bundle=1 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +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 +eclipse.preferences.version=1 diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/CommandToStringConverter.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/CommandToStringConverter.java index d3979790..afebef3b 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/CommandToStringConverter.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/CommandToStringConverter.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.common; @@ -17,8 +17,9 @@ import org.eclipse.e4.ui.model.application.commands.MCommand; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; +@SuppressWarnings("restriction") public class CommandToStringConverter extends Converter { - private Messages Messages; + private final Messages Messages; public CommandToStringConverter(Messages Messages) { super(MCommand.class, String.class); @@ -27,7 +28,7 @@ public class CommandToStringConverter extends Converter { @Override public Object convert(Object fromObject) { - MCommand cmd = (MCommand) fromObject; + final MCommand cmd = (MCommand) fromObject; String elementId = null; if (cmd != null && cmd.getElementId() != null && cmd.getElementId().trim().length() > 0) { elementId = cmd.getElementId(); @@ -39,9 +40,9 @@ public class CommandToStringConverter extends Converter { } else if (elementId != null) { return elementId; } else { - Resource res = ((EObject) cmd).eResource(); + final Resource res = ((EObject) cmd).eResource(); if (res instanceof E4XMIResource) { - String v = ((E4XMIResource) res).getID((EObject) cmd); + final String v = ((E4XMIResource) res).getID((EObject) cmd); if (v != null && v.trim().length() > 0) { return v; } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java index 7ed891ff..059be463 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/IClassContributionProvider.java @@ -6,13 +6,14 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - * Steven Spungin <steven@spungin.tv> - Bug 424730, Bug 436281 + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Steven Spungin <steven@spungin.tv> - Bug 424730, Bug 436281 ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.common; import java.util.EnumSet; import java.util.List; + import org.eclipse.core.resources.IProject; import org.eclipse.core.runtime.IProgressMonitor; @@ -82,11 +83,6 @@ public interface IClassContributionProvider { return bundles; } - /** - * Sets the packages to filter on - * - * @return - */ public List<String> getPackages() { return packages; } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java index a3b77af4..6fa6d071 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/Util.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.common; @@ -15,6 +15,7 @@ import java.util.List; import java.util.Map.Entry; import java.util.SortedSet; import java.util.TreeSet; + import org.eclipse.core.databinding.Binding; import org.eclipse.core.databinding.observable.value.IValueChangeListener; import org.eclipse.core.databinding.observable.value.ValueChangeEvent; @@ -44,6 +45,7 @@ import org.eclipse.jface.fieldassist.FieldDecorationRegistry; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Control; +@SuppressWarnings("restriction") public class Util { public static final boolean isNullOrEmpty(String element) { return element == null || element.trim().length() == 0; @@ -54,16 +56,18 @@ public class Util { } public static final void addClasses(EPackage ePackage, List<FeatureClass> list) { - for (EClassifier c : ePackage.getEClassifiers()) { + for (final EClassifier c : ePackage.getEClassifiers()) { if (c instanceof EClass) { - EClass eclass = (EClass) c; - if (eclass != ApplicationPackageImpl.Literals.APPLICATION && !eclass.isAbstract() && !eclass.isInterface() && eclass.getEAllSuperTypes().contains(ApplicationPackageImpl.Literals.APPLICATION_ELEMENT)) { + final EClass eclass = (EClass) c; + if (eclass != ApplicationPackageImpl.Literals.APPLICATION && !eclass.isAbstract() + && !eclass.isInterface() + && eclass.getEAllSuperTypes().contains(ApplicationPackageImpl.Literals.APPLICATION_ELEMENT)) { list.add(new FeatureClass(eclass.getName(), eclass)); } } } - for (EPackage eSubPackage : ePackage.getESubpackages()) { + for (final EPackage eSubPackage : ePackage.getESubpackages()) { addClasses(eSubPackage, list); } } @@ -72,25 +76,25 @@ public class Util { // ${project}.${classname}.${counter} public static final String getDefaultElementId(Resource resource, MApplicationElement element, IProject project) { try { - EObject o = (EObject) element; - String className = o.eClass().getName(); - String projectName = project.getName(); + final EObject o = (EObject) element; + final String className = o.eClass().getName(); + final String projectName = project.getName(); - String prefix = (projectName + "." + className).toLowerCase(); //$NON-NLS-1$ + final String prefix = (projectName + "." + className).toLowerCase(); //$NON-NLS-1$ - TreeIterator<EObject> it = resource.getAllContents(); - SortedSet<Integer> numbers = new TreeSet<Integer>(); + final TreeIterator<EObject> it = resource.getAllContents(); + final SortedSet<Integer> numbers = new TreeSet<Integer>(); while (it.hasNext()) { - EObject tmp = it.next(); + final EObject tmp = it.next(); if (tmp instanceof MApplicationElement) { - String elementId = ((MApplicationElement) tmp).getElementId(); + final String elementId = ((MApplicationElement) tmp).getElementId(); if (elementId != null && elementId.length() > prefix.length() && elementId.startsWith(prefix)) { - String suffix = elementId.substring(prefix.length()); + final String suffix = elementId.substring(prefix.length()); if (suffix.startsWith(".") && suffix.length() > 1) { //$NON-NLS-1$ try { numbers.add(Integer.parseInt(suffix.substring(1))); - } catch (Exception e) { + } catch (final Exception e) { // TODO: handle exception } } @@ -99,15 +103,15 @@ public class Util { } int lastNumber = -1; - for (Integer number : numbers) { - if ((lastNumber + 1) != number) { + for (final Integer number : numbers) { + if (lastNumber + 1 != number) { break; } lastNumber = number; } return (prefix + "." + ++lastNumber).toLowerCase(); //$NON-NLS-1$ - } catch (Exception e) { + } catch (final Exception e) { // TODO: handle exception e.printStackTrace(); } @@ -115,22 +119,22 @@ public class Util { } public static List<InternalPackage> loadPackages() { - List<InternalPackage> packs = new ArrayList<InternalPackage>(); + final List<InternalPackage> packs = new ArrayList<InternalPackage>(); - for (Entry<String, Object> regEntry : EPackage.Registry.INSTANCE.entrySet()) { + for (final Entry<String, Object> regEntry : EPackage.Registry.INSTANCE.entrySet()) { if (regEntry.getValue() instanceof EPackage) { - EPackage ePackage = (EPackage) regEntry.getValue(); - InternalPackage iePackage = new InternalPackage(ePackage); + final EPackage ePackage = (EPackage) regEntry.getValue(); + final InternalPackage iePackage = new InternalPackage(ePackage); boolean found = false; - for (EClassifier cl : ePackage.getEClassifiers()) { + for (final EClassifier cl : ePackage.getEClassifiers()) { if (cl instanceof EClass) { - EClass eClass = (EClass) cl; + final EClass eClass = (EClass) cl; if (eClass.getEAllSuperTypes().contains(ApplicationPackageImpl.Literals.APPLICATION_ELEMENT)) { if (!eClass.isInterface() && !eClass.isAbstract()) { found = true; - InternalClass ieClass = new InternalClass(iePackage, eClass); + final InternalClass ieClass = new InternalClass(iePackage, eClass); iePackage.classes.add(ieClass); - for (EReference f : eClass.getEAllReferences()) { + for (final EReference f : eClass.getEAllReferences()) { ieClass.features.add(new InternalFeature(ieClass, f)); } } @@ -146,10 +150,11 @@ public class Util { return packs; } - public static boolean moveElementByIndex(EditingDomain editingDomain, MUIElement element, boolean liveModel, int index, EStructuralFeature feature) { + public static boolean moveElementByIndex(EditingDomain editingDomain, MUIElement element, boolean liveModel, + int index, EStructuralFeature feature) { if (liveModel) { - EObject container = ((EObject) element).eContainer(); - List<Object> l = (List<Object>) container.eGet(feature); + final EObject container = ((EObject) element).eContainer(); + final List<Object> l = (List<Object>) container.eGet(feature); l.remove(element); if (index >= 0) { @@ -159,21 +164,21 @@ public class Util { } return true; - } else { - EObject container = ((EObject) element).eContainer(); - Command cmd = MoveCommand.create(editingDomain, container, feature, element, index); + } + final EObject container = ((EObject) element).eContainer(); + final Command cmd = MoveCommand.create(editingDomain, container, feature, element, index); - if (cmd.canExecute()) { - editingDomain.getCommandStack().execute(cmd); - return true; - } - return false; + if (cmd.canExecute()) { + editingDomain.getCommandStack().execute(cmd); + return true; } + return false; } - public static boolean moveElementByIndex(EditingDomain editingDomain, MUIElement element, boolean liveModel, int index) { + public static boolean moveElementByIndex(EditingDomain editingDomain, MUIElement element, boolean liveModel, + int index) { if (liveModel) { - MElementContainer<MUIElement> container = element.getParent(); + final MElementContainer<MUIElement> container = element.getParent(); container.getChildren().remove(element); if (index >= 0) { @@ -184,16 +189,16 @@ public class Util { container.setSelectedElement(element); return true; - } else { - MElementContainer<MUIElement> container = element.getParent(); - Command cmd = MoveCommand.create(editingDomain, container, UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, element, index); + } + final MElementContainer<MUIElement> container = element.getParent(); + final Command cmd = MoveCommand.create(editingDomain, container, + UiPackageImpl.Literals.ELEMENT_CONTAINER__CHILDREN, element, index); - if (cmd.canExecute()) { - editingDomain.getCommandStack().execute(cmd); - return true; - } - return false; + if (cmd.canExecute()) { + editingDomain.getCommandStack().execute(cmd); + return true; } + return false; } public static final void addDecoration(Control control, Binding binding) { @@ -202,7 +207,7 @@ public class Util { @Override public void handleValueChange(ValueChangeEvent event) { - IStatus s = (IStatus) event.getObservableValue().getValue(); + final IStatus s = (IStatus) event.getObservableValue().getValue(); if (s.isOK()) { dec.setDescriptionText(null); dec.setImage(null); @@ -222,7 +227,8 @@ public class Util { fieldDecorationID = FieldDecorationRegistry.DEC_ERROR; break; } - FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(fieldDecorationID); + final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration( + fieldDecorationID); dec.setImage(fieldDecoration == null ? null : fieldDecoration.getImage()); } } @@ -243,8 +249,8 @@ public class Util { } public List<EClass> getAllClasses() { - ArrayList<EClass> rv = new ArrayList<EClass>(classes.size()); - for (InternalClass c : classes) { + final ArrayList<EClass> rv = new ArrayList<EClass>(classes.size()); + for (final InternalClass c : classes) { rv.add(c.eClass); } return rv; diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java index bdacafc4..405b9fe8 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/XMIModelResource.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.common; @@ -17,6 +17,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Map.Entry; + import org.eclipse.core.databinding.observable.list.IObservableList; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Status; @@ -41,19 +42,21 @@ import org.eclipse.emf.edit.domain.EditingDomain; import org.eclipse.emf.edit.provider.ComposedAdapterFactory; import org.eclipse.emf.edit.provider.ReflectiveItemProviderAdapterFactory; +@SuppressWarnings("restriction") public class XMIModelResource implements IModelResource { - private EditingDomain editingDomain; - private Resource resource; - private List<ModelListener> listeners = new ArrayList<IModelResource.ModelListener>(); + private final EditingDomain editingDomain; + private final Resource resource; + private final List<ModelListener> listeners = new ArrayList<IModelResource.ModelListener>(); private IObservableList list; public XMIModelResource(URI uri) { - ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); + final ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory( + ComposedAdapterFactory.Descriptor.Registry.INSTANCE); adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory()); - ResourceSet resourceSet = new ResourceSetImpl(); - BasicCommandStack commandStack = new BasicCommandStack(); + final ResourceSet resourceSet = new ResourceSetImpl(); + final BasicCommandStack commandStack = new BasicCommandStack(); commandStack.addCommandStackListener(new CommandStackListener() { @Override @@ -63,7 +66,8 @@ public class XMIModelResource implements IModelResource { } }); editingDomain = new AdapterFactoryEditingDomain(adapterFactory, commandStack, resourceSet); - resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new E4XMIResourceFactory()); + resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap() + .put(Resource.Factory.Registry.DEFAULT_EXTENSION, new E4XMIResourceFactory()); resource = resourceSet.getResource(uri, true); } @@ -81,24 +85,24 @@ public class XMIModelResource implements IModelResource { @Override public void replaceRoot(EObject eObject) { E4XMIResource resource = (E4XMIResource) eObject.eResource(); - Map<EObject, String> idMap = new HashMap<EObject, String>(); + final Map<EObject, String> idMap = new HashMap<EObject, String>(); idMap.put(eObject, resource.getID(eObject)); - TreeIterator<EObject> it = EcoreUtil.getAllContents(eObject, true); + final TreeIterator<EObject> it = EcoreUtil.getAllContents(eObject, true); while (it.hasNext()) { - EObject o = it.next(); + final EObject o = it.next(); resource = (E4XMIResource) o.eResource(); idMap.put(o, resource.getID(o)); } resource = (E4XMIResource) ((EObject) list.get(0)).eResource(); - Command cmdRemove = new RemoveCommand(getEditingDomain(), resource.getContents(), list.get(0)); - Command cmdAdd = new AddCommand(getEditingDomain(), resource.getContents(), eObject); - CompoundCommand cmd = new CompoundCommand(Arrays.asList(cmdRemove, cmdAdd)); + final Command cmdRemove = new RemoveCommand(getEditingDomain(), resource.getContents(), list.get(0)); + final Command cmdAdd = new AddCommand(getEditingDomain(), resource.getContents(), eObject); + final CompoundCommand cmd = new CompoundCommand(Arrays.asList(cmdRemove, cmdAdd)); getEditingDomain().getCommandStack().execute(cmd); - for (Entry<EObject, String> e : idMap.entrySet()) { + for (final Entry<EObject, String> e : idMap.entrySet()) { resource.setID(e.getKey(), e.getValue()); } } @@ -129,30 +133,30 @@ public class XMIModelResource implements IModelResource { } private void fireDirtyChanged() { - for (ModelListener listener : listeners) { + for (final ModelListener listener : listeners) { listener.dirtyChanged(); } } private void fireCommandStackChanged() { - for (ModelListener listener : listeners) { + for (final ModelListener listener : listeners) { listener.commandStackChanged(); } } @Override public IStatus save() { - Map<String, String> map = new HashMap<String, String>(); + final Map<String, String> map = new HashMap<String, String>(); try { resource.save(map); - BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack(); + final BasicCommandStack commandStack = (BasicCommandStack) getEditingDomain().getCommandStack(); commandStack.saveIsDone(); fireDirtyChanged(); fireCommandStackChanged(); - } catch (Exception e) { + } catch (final Exception e) { // TODO: handle exception e.printStackTrace(); } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/IdGenerator.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/IdGenerator.java index a1ac8e23..f9342c5a 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/IdGenerator.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/common/component/IdGenerator.java @@ -6,13 +6,14 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Steven Spungin <steven@spungin.tv> - initial API and implementation, Bug 437951 + * Steven Spungin <steven@spungin.tv> - initial API and implementation, Bug 437951 *******************************************************************************/ package org.eclipse.e4.tools.emf.ui.common.component; import java.util.regex.Matcher; import java.util.regex.Pattern; + import org.eclipse.core.databinding.observable.value.IObservableValue; import org.eclipse.core.databinding.observable.value.IValueChangeListener; import org.eclipse.core.databinding.observable.value.ValueChangeEvent; @@ -41,14 +42,15 @@ public class IdGenerator { /** * Bind must be called AFTER the master observable value is set in order to * properly initialize. - * + * * @param master * @param ebpLabel * @param evpId * @param control * Optional control. */ - public void bind(final IObservableValue master, final IEMFEditValueProperty ebpLabel, final IEMFEditValueProperty evpId, Control control) { + public void bind(final IObservableValue master, final IEMFEditValueProperty ebpLabel, + final IEMFEditValueProperty evpId, Control control) { // RULES // Only start generating if the label is initially empty and the id ends @@ -66,7 +68,7 @@ public class IdGenerator { if (origId == null) { origId = "id.0"; //$NON-NLS-1$ } - Matcher m = patternId.matcher(origId); + final Matcher m = patternId.matcher(origId); if (!m.matches()) { stopGenerating(); return; @@ -78,7 +80,7 @@ public class IdGenerator { @Override public void focusLost(org.eclipse.swt.events.FocusEvent e) { stopGenerating(); - }; + } }); control.addDisposeListener(new DisposeListener() { @@ -110,7 +112,7 @@ public class IdGenerator { if (labelValue == null) { labelValue = ""; //$NON-NLS-1$ } - String camelCase = camelCase(labelValue); + final String camelCase = camelCase(labelValue); ignore = true; evpId.setValue(master.getValue(), baseId + camelCase); ignore = false; @@ -126,7 +128,7 @@ public class IdGenerator { * @return */ protected static String camelCase(String value) { - String[] parts = value.split("\\s+"); //$NON-NLS-1$ + final String[] parts = value.split("\\s+"); //$NON-NLS-1$ String ret = ""; //$NON-NLS-1$ boolean first = true; for (String part : parts) { diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java index f9b79cb6..6bf45848 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/PatternFilter.java @@ -6,8 +6,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporation - initial API and implementation - * Wim Jongman - Maintenance (391086) + * IBM Corporation - initial API and implementation + * Wim Jongman - Maintenance (391086) *******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal; @@ -15,11 +15,11 @@ import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.StructuredViewer; import org.eclipse.jface.viewers.Viewer; +@SuppressWarnings("restriction") public class PatternFilter extends org.eclipse.e4.ui.workbench.swt.internal.copy.PatternFilter { /** - * This constructor will call {@link #setIncludeLeadingWildcard(boolean)} - * with boolean=true. + * This constructor will call {@link #setIncludeLeadingWildcard(boolean)} with boolean=true. */ public PatternFilter() { setIncludeLeadingWildcard(true); @@ -28,9 +28,9 @@ public class PatternFilter extends org.eclipse.e4.ui.workbench.swt.internal.copy /** * Check if the current (leaf) element is a match with the filter text. The * default behavior checks that the label of the element is a match. - * + * * Subclasses should override this method. - * + * * @param viewer * the viewer that contains the element * @param element @@ -40,7 +40,7 @@ public class PatternFilter extends org.eclipse.e4.ui.workbench.swt.internal.copy @Override protected boolean isLeafMatch(Viewer viewer, Object element) { - Object labelProvider = ((StructuredViewer) viewer).getLabelProvider(); + final Object labelProvider = ((StructuredViewer) viewer).getLabelProvider(); String labelText = null; if (labelProvider instanceof ILabelProvider) { diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java index e66e52dc..4187c649 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/StringMatcher.java @@ -6,7 +6,7 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * IBM Corporation - initial API and implementation + * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal; @@ -29,7 +29,7 @@ public class StringMatcher { protected boolean fHasTrailingStar; protected String fSegments[]; // the given pattern is split into * separated - // segments + // segments /* boundary value beyond which we don't need to search in the text */ protected int fBound = 0; @@ -95,9 +95,8 @@ public class StringMatcher { } /** - * Find the first occurrence of the pattern between <code>start</code - * )(inclusive) and <code>end</code>(exclusive). - * + * Find the first occurrence of the pattern between <code>start</code )(inclusive) and <code>end</code>(exclusive). + * * @param text * the String object to search in * @param start @@ -118,7 +117,7 @@ public class StringMatcher { throw new IllegalArgumentException(); } - int tlen = text.length(); + final int tlen = text.length(); if (start < 0) { start = 0; } @@ -132,14 +131,14 @@ public class StringMatcher { return new Position(start, start); } if (fIgnoreWildCards) { - int x = posIn(text, start, end); + final int x = posIn(text, start, end); if (x < 0) { return null; } return new Position(x, x + fLength); } - int segCount = fSegments.length; + final int segCount = fSegments.length; if (segCount == 0) { return new Position(start, end); } @@ -148,8 +147,8 @@ public class StringMatcher { int matchStart = -1; int i; for (i = 0; i < segCount && curPos < end; ++i) { - String current = fSegments[i]; - int nextMatch = regExpPosIn(text, curPos, end, current); + final String current = fSegments[i]; + final int nextMatch = regExpPosIn(text, curPos, end, current); if (nextMatch < 0) { return null; } @@ -166,7 +165,7 @@ public class StringMatcher { /** * match the given <code>text</code> with the pattern - * + * * @return true if matched otherwise false * @param text * a String object @@ -182,7 +181,7 @@ public class StringMatcher { * Given the starting (inclusive) and the ending (exclusive) positions in * the <code>text</code>, determine if the given substring matches with * aPattern - * + * * @return true if the specified portion of the text matches the pattern * @param text * a String object that contains the substring to match @@ -201,9 +200,9 @@ public class StringMatcher { } if (fIgnoreWildCards) { - return (end - start == fLength) && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength); + return end - start == fLength && fPattern.regionMatches(fIgnoreCase, 0, text, start, fLength); } - int segCount = fSegments.length; + final int segCount = fSegments.length; if (segCount == 0 && (fHasLeadingStar || fHasTrailingStar)) { return true; } @@ -214,7 +213,7 @@ public class StringMatcher { return start == end; } - int tlen = text.length(); + final int tlen = text.length(); if (start < 0) { start = 0; } @@ -223,24 +222,23 @@ public class StringMatcher { } int tCurPos = start; - int bound = end - fBound; + final int bound = end - fBound; if (bound < 0) { return false; } int i = 0; String current = fSegments[i]; - int segLength = current.length(); + final int segLength = current.length(); /* process first segment */ if (!fHasLeadingStar) { if (!regExpRegionMatches(text, start, current, 0, segLength)) { return false; - } else { - ++i; - tCurPos = tCurPos + segLength; } + ++i; + tCurPos = tCurPos + segLength; } - if ((fSegments.length == 1) && (!fHasLeadingStar) && (!fHasTrailingStar)) { + if (fSegments.length == 1 && !fHasLeadingStar && !fHasTrailingStar) { // only one segment to match, no wildcards specified return tCurPos == end; } @@ -248,7 +246,7 @@ public class StringMatcher { while (i < segCount) { current = fSegments[i]; int currentMatch; - int k = current.indexOf(fSingleWildCard); + final int k = current.indexOf(fSingleWildCard); if (k < 0) { currentMatch = textPosIn(text, tCurPos, end, current); if (currentMatch < 0) { @@ -266,7 +264,7 @@ public class StringMatcher { /* process final segment */ if (!fHasTrailingStar && tCurPos != end) { - int clen = current.length(); + final int clen = current.length(); return regExpRegionMatches(text, end - clen, current, 0, clen); } return i == segCount; @@ -286,7 +284,7 @@ public class StringMatcher { /** * Parses the given pattern into segments seperated by wildcard '*' * characters. - * + * * @param p * , a String object that is a simple regular expression with '*' * and/or '?' @@ -302,18 +300,18 @@ public class StringMatcher { } } - Vector<String> temp = new Vector<String>(); + final Vector<String> temp = new Vector<String>(); int pos = 0; - StringBuffer buf = new StringBuffer(); + final StringBuffer buf = new StringBuffer(); while (pos < fLength) { - char c = fPattern.charAt(pos++); + final char c = fPattern.charAt(pos++); switch (c) { case '\\': if (pos >= fLength) { buf.append(c); } else { - char next = fPattern.charAt(pos++); + final char next = fPattern.charAt(pos++); /* if it's an escape sequence */ if (next == '*' || next == '?' || next == '\\') { buf.append(next); @@ -362,11 +360,11 @@ public class StringMatcher { * found */ protected int posIn(String text, int start, int end) {// no wild card in - // pattern - int max = end - fLength; + // pattern + final int max = end - fLength; if (!fIgnoreCase) { - int i = text.indexOf(fPattern, start); + final int i = text.indexOf(fPattern, start); if (i == -1 || i > max) { return -1; } @@ -395,9 +393,9 @@ public class StringMatcher { * found */ protected int regExpPosIn(String text, int start, int end, String p) { - int plen = p.length(); + final int plen = p.length(); - int max = end - plen; + final int max = end - plen; for (int i = start; i <= max; ++i) { if (regExpRegionMatches(text, i, p, 0, plen)) { return i; @@ -407,7 +405,7 @@ public class StringMatcher { } /** - * + * * @return boolean * @param text * a String to match @@ -424,8 +422,8 @@ public class StringMatcher { */ protected boolean regExpRegionMatches(String text, int tStart, String p, int pStart, int plen) { while (plen-- > 0) { - char tchar = text.charAt(tStart++); - char pchar = p.charAt(pStart++); + final char tchar = text.charAt(tStart++); + final char pchar = p.charAt(pStart++); /* process wild cards */ if (!fIgnoreWildCards) { @@ -467,11 +465,11 @@ public class StringMatcher { */ protected int textPosIn(String text, int start, int end, String p) { - int plen = p.length(); - int max = end - plen; + final int plen = p.length(); + final int max = end - plen; if (!fIgnoreCase) { - int i = text.indexOf(p, start); + final int i = text.indexOf(p, start); if (i == -1 || i > max) { return -1; } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java index ece8294e..e97ff8a8 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractCommandSelectionDialog.java @@ -6,13 +6,14 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - * Andrej ten Brummelhuis <andrejbrummelhuis@gmail.com> - Bug 395283 + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Andrej ten Brummelhuis <andrejbrummelhuis@gmail.com> - Bug 395283 ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs; import java.util.ArrayList; import java.util.List; + import org.eclipse.e4.tools.emf.ui.common.IModelResource; import org.eclipse.e4.tools.emf.ui.internal.Messages; import org.eclipse.e4.tools.emf.ui.internal.PatternFilter; @@ -47,8 +48,9 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; +@SuppressWarnings("restriction") public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSettingsDialog { - private IModelResource resource; + private final IModelResource resource; private TableViewer viewer; protected Messages Messages; @@ -66,12 +68,13 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet @Override protected Control createDialogArea(Composite parent) { - Composite composite = (Composite) super.createDialogArea(parent); + final Composite composite = (Composite) super.createDialogArea(parent); getShell().setText(getShellTitle()); setTitle(getDialogTitle()); setMessage(getDialogMessage()); - final Image titleImage = new Image(composite.getDisplay(), getClass().getClassLoader().getResourceAsStream("/icons/full/wizban/newexp_wiz.png")); //$NON-NLS-1$ + final Image titleImage = new Image(composite.getDisplay(), getClass().getClassLoader().getResourceAsStream( + "/icons/full/wizban/newexp_wiz.png")); //$NON-NLS-1$ setTitleImage(titleImage); getShell().addDisposeListener(new DisposeListener() { @@ -81,14 +84,14 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet } }); - Composite container = new Composite(composite, SWT.NONE); + final Composite container = new Composite(composite, SWT.NONE); container.setLayoutData(new GridData(GridData.FILL_BOTH)); container.setLayout(new GridLayout(2, false)); - Label l = new Label(container, SWT.NONE); + final Label l = new Label(container, SWT.NONE); l.setText(Messages.AbstractCommandSelectionDialog_Label_CommandId); - Text searchText = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH); + final Text searchText = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH); searchText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); new Label(container, SWT.NONE); @@ -104,10 +107,10 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet } }); - List<EObject> commands = new ArrayList<EObject>(); - TreeIterator<EObject> it = EcoreUtil.getAllContents((EObject) resource.getRoot().get(0), true); + final List<EObject> commands = new ArrayList<EObject>(); + final TreeIterator<EObject> it = EcoreUtil.getAllContents((EObject) resource.getRoot().get(0), true); while (it.hasNext()) { - EObject o = it.next(); + final EObject o = it.next(); if (o.eClass() == CommandsPackageImpl.Literals.COMMAND) { commands.add(o); } @@ -129,9 +132,9 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet @Override protected void okPressed() { - IStructuredSelection s = (IStructuredSelection) viewer.getSelection(); + final IStructuredSelection s = (IStructuredSelection) viewer.getSelection(); if (!s.isEmpty()) { - Command cmd = createStoreCommand(resource.getEditingDomain(), (MCommand) s.getFirstElement()); + final Command cmd = createStoreCommand(resource.getEditingDomain(), (MCommand) s.getFirstElement()); if (cmd.canExecute()) { resource.getEditingDomain().getCommandStack().execute(cmd); super.okPressed(); @@ -150,9 +153,9 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet @Override public void update(final ViewerCell cell) { - MCommand cmd = (MCommand) cell.getElement(); + final MCommand cmd = (MCommand) cell.getElement(); - StyledString styledString = new StyledString(); + final StyledString styledString = new StyledString(); if (cmd.getCommandName() != null) { styledString.append(cmd.getCommandName()); } @@ -173,7 +176,7 @@ public abstract class AbstractCommandSelectionDialog extends SaveDialogBoundsSet @Override public String getText(Object element) { - MCommand command = (MCommand) element; + final MCommand command = (MCommand) element; String s = ""; //$NON-NLS-1$ if (command.getCommandName() != null) { s += command.getCommandName(); diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialogWithScopeAndFilter.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialogWithScopeAndFilter.java index 20ec2d01..8647a028 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialogWithScopeAndFilter.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIconDialogWithScopeAndFilter.java @@ -1,5 +1,5 @@ /******************************************************************************* - + * * Copyright (c) 2010 BestSolution.at and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -7,8 +7,8 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation - * Steven Spungin <steven@spungin.tv> - Bug 404136, Bug 424730, Bug 436281 + * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation + * Steven Spungin <steven@spungin.tv> - Bug 404136, Bug 424730, Bug 436281 ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs; @@ -22,6 +22,7 @@ import java.util.List; import java.util.Map; import java.util.Timer; import java.util.TimerTask; + import org.eclipse.core.databinding.observable.list.IObservableList; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -62,19 +63,18 @@ import org.eclipse.swt.widgets.Shell; * A FilteredContributionDialog with additional options for icon resources. * Features in include * <ul> - * <li>Rebuilding the viewer when row height decreases. (Workaround for an SWT - * limitation) + * <li>Rebuilding the viewer when row height decreases. (Workaround for an SWT limitation) * <li>Icon previews are displace in the first column. * <li>Limited the maximum image size. * </ul> * * @author "Steven Spungin" * - * @see @FilteredContributionDialog + * @see FilteredContributionDialog */ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContributionDialog { - private IProject project; - private Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<IFile, Image>()); + private final IProject project; + private final Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<IFile, Image>()); static public class Entry { IFile file; @@ -87,7 +87,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr public AbstractIconDialogWithScopeAndFilter(Shell parentShell, IEclipseContext context) { super(parentShell, context); - this.project = context.get(IProject.class); + project = context.get(IProject.class); } @Override @@ -112,7 +112,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr protected void createOptions(Composite compOptions) { super.createOptions(compOptions); - Label lblMaxSize = new Label(compOptions, SWT.NONE); + final Label lblMaxSize = new Label(compOptions, SWT.NONE); lblMaxSize.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); lblMaxSize.setText(Messages.AbstractIconDialogWithScopeAndFilter_maxDisplayedImageSize); @@ -148,9 +148,9 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr ((GridData) getViewer().getTable().getLayoutData()).minimumHeight = 100; - TableViewerColumn colIcon = new TableViewerColumn(getViewer(), SWT.NONE); + final TableViewerColumn colIcon = new TableViewerColumn(getViewer(), SWT.NONE); colIcon.getColumn().setText(Messages.AbstractIconDialogWithScopeAndFilter_icon); - TableViewerColumn colText = new TableViewerColumn(getViewer(), SWT.NONE); + final TableViewerColumn colText = new TableViewerColumn(getViewer(), SWT.NONE); colText.getColumn().setText(Messages.AbstractIconDialogWithScopeAndFilter_details); // resize the row height using a MeasureItem listener @@ -181,14 +181,14 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr in = file.getContents(); img = new Image(cell.getControl().getDisplay(), in); icons.put(file, img); - } catch (Exception e) { + } catch (final Exception e) { // e.printStackTrace(); return; } finally { if (in != null) { try { in.close(); - } catch (IOException e) { + } catch (final IOException e) { // TODO Auto-generated catch block // e.printStackTrace(); } @@ -198,32 +198,35 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr // scale image if larger then max height // also remember max width for column resizing - if (img != null) { - double scale1 = ((double) maxDisplayedImageSize) / img.getImageData().height; - double scale2 = ((double) maxDisplayedImageSize) / img.getImageData().width; - if (scale2 < scale1) { - scale1 = scale2; - } - if (scale1 < 1) { - int width = (int) (img.getImageData().width * scale1); - if (width == 0) - width = 1; - int height = (int) (img.getImageData().height * scale1); - if (height == 0) - height = 1; - Image img2 = new Image(img.getDevice(), img.getImageData().scaledTo(width, height)); - img.dispose(); - img = img2; - icons.put(file, img); - } - int width = AbstractIconDialogWithScopeAndFilter.this.getViewer().getTable().getColumn(0).getWidth(); - if (img.getImageData().width > width) { - AbstractIconDialogWithScopeAndFilter.this.getViewer().getTable().getColumn(0).setWidth(img.getImageData().width); + + double scale1 = (double) maxDisplayedImageSize / img.getImageData().height; + final double scale2 = (double) maxDisplayedImageSize / img.getImageData().width; + if (scale2 < scale1) { + scale1 = scale2; + } + if (scale1 < 1) { + int width = (int) (img.getImageData().width * scale1); + if (width == 0) { + width = 1; } - int height = img.getImageData().height; - if (height > maxImageHeight) { - maxImageHeight = height; + int height = (int) (img.getImageData().height * scale1); + if (height == 0) { + height = 1; } + final Image img2 = new Image(img.getDevice(), img.getImageData().scaledTo(width, height)); + img.dispose(); + img = img2; + icons.put(file, img); + } + final int width = AbstractIconDialogWithScopeAndFilter.this.getViewer().getTable().getColumn(0) + .getWidth(); + if (img.getImageData().width > width) { + AbstractIconDialogWithScopeAndFilter.this.getViewer().getTable().getColumn(0) + .setWidth(img.getImageData().width); + } + final int height = img.getImageData().height; + if (height > maxImageHeight) { + maxImageHeight = height; } cell.setImage(img); @@ -237,7 +240,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr IFile file; String installLocation = null; if (cell.getElement() instanceof ContributionData) { - ContributionData contributionData = (ContributionData) cell.getElement(); + final ContributionData contributionData = (ContributionData) cell.getElement(); file = new ContributionDataFile(contributionData); installLocation = contributionData.installLocation; } else if (cell.getElement() instanceof Entry) { @@ -246,8 +249,8 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr } else { file = (IFile) cell.getElement(); } - StyledString styledString = new StyledString(file.getProjectRelativePath().toString(), null); - String bundle = FilteredContributionDialog.getBundle(file); + final StyledString styledString = new StyledString(file.getProjectRelativePath().toString(), null); + final String bundle = FilteredContributionDialog.getBundle(file); if (bundle != null) { styledString.append(" - " + bundle, StyledString.DECORATIONS_STYLER); //$NON-NLS-1$ } else if (installLocation != null) { @@ -271,7 +274,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr @Override protected Control createDialogArea(Composite parent) { - Composite comp = (Composite) super.createDialogArea(parent); + final Composite comp = (Composite) super.createDialogArea(parent); maxDisplayedImageSize = 20; rebuildViewer(); @@ -289,35 +292,34 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr // getSearchScopes().contains(SearchScope.WORKSPACE)) { if (getSearchScopes().contains(ResourceSearchScope.TARGET_PLATFORM)) { return false; - } else { - Timer timer = new Timer(true); + } + final Timer timer = new Timer(true); - if (callback != null) { - callback.cancel = true; - } - if (task != null) { - task.cancel(); - } - task = null; - - clearImages(); - - callback = new IconMatchCallback((IObservableList) getViewer().getInput()); - Filter filter = new Filter(project, getFilterTextBox().getText()); - filter.setSearchScope(getSearchScopes()); - filter.setBundles(getFilterBundles()); - filter.setLocations(getFilterLocations()); - filter.setPackages(getFilterPackages()); - filter.setIncludeNonBundles(includeNonBundles); - task = new SearchThread(callback, filter); - timer.schedule(task, 500); - // } - return true; + if (callback != null) { + callback.cancel = true; + } + if (task != null) { + task.cancel(); } + task = null; + + clearImages(); + + callback = new IconMatchCallback((IObservableList) getViewer().getInput()); + final Filter filter = new Filter(project, getFilterTextBox().getText()); + filter.setSearchScope(getSearchScopes()); + filter.setBundles(getFilterBundles()); + filter.setLocations(getFilterLocations()); + filter.setPackages(getFilterPackages()); + filter.setIncludeNonBundles(includeNonBundles); + task = new SearchThread(callback, filter); + timer.schedule(task, 500); + // } + return true; } private void clearImages() { - for (Image img : icons.values()) { + for (final Image img : icons.values()) { img.dispose(); } icons.clear(); @@ -330,13 +332,13 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr if (file != null) { String installLocation = null; if (file instanceof ContributionDataFile) { - ContributionDataFile cdf = (ContributionDataFile) file; + final ContributionDataFile cdf = (ContributionDataFile) file; installLocation = cdf.getContributionData().installLocation; } file = checkResourceAccessible(file, installLocation); if (file != null) { - String bundle = getBundle(file); + final String bundle = getBundle(file); String uri; uri = "platform:/plugin/" + bundle + "/" + file.getProjectRelativePath().toString(); //$NON-NLS-1$ //$NON-NLS-2$ returnValue = uri; @@ -347,7 +349,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr private class IconMatchCallback { private volatile boolean cancel; - private IObservableList list; + private final IObservableList list; private IconMatchCallback(IObservableList list) { this.list = list; @@ -359,7 +361,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr @Override public void run() { - Entry entry = new Entry(); + final Entry entry = new Entry(); entry.file = file; entry.installLocation = installLocation; list.add(entry); @@ -374,13 +376,13 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr private final StringMatcher matcherGif; private final StringMatcher matcherJpg; private final StringMatcher matcherPng; - private Filter filter; + private final Filter filter; private boolean includeNonBundles; public SearchThread(IconMatchCallback callback, Filter filter) { - this.matcherGif = new StringMatcher("*" + filter.namePattern + "*.gif", true, false); //$NON-NLS-1$//$NON-NLS-2$ - this.matcherJpg = new StringMatcher("*" + filter.namePattern + "*.jpg", true, false); //$NON-NLS-1$//$NON-NLS-2$ - this.matcherPng = new StringMatcher("*" + filter.namePattern + "*.png", true, false); //$NON-NLS-1$//$NON-NLS-2$ + matcherGif = new StringMatcher("*" + filter.namePattern + "*.gif", true, false); //$NON-NLS-1$//$NON-NLS-2$ + matcherJpg = new StringMatcher("*" + filter.namePattern + "*.jpg", true, false); //$NON-NLS-1$//$NON-NLS-2$ + matcherPng = new StringMatcher("*" + filter.namePattern + "*.png", true, false); //$NON-NLS-1$//$NON-NLS-2$ this.callback = callback; this.filter = filter; } @@ -399,10 +401,10 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr projects = new ArrayList<IProject>(); projects.add(filter.project); try { - for (IProject ref : filter.project.getReferencedProjects()) { + for (final IProject ref : filter.project.getReferencedProjects()) { projects.add(ref); } - } catch (CoreException e) { + } catch (final CoreException e) { e.printStackTrace(); } } else { @@ -429,10 +431,11 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr if (resource.getType() == IResource.FOLDER || resource.getType() == IResource.PROJECT) { return true; } else if (resource.getType() == IResource.FILE && !resource.isLinked()) { - String path = resource.getProjectRelativePath().toString(); + final String path = resource.getProjectRelativePath().toString(); if (matcherGif.match(path) || matcherPng.match(path) || matcherJpg.match(path)) { if (E.notEmpty(filter.getPackages())) { - if (!filter.getPackages().contains(resource.getProjectRelativePath().removeLastSegments(1).toOSString())) { + if (!filter.getPackages().contains( + resource.getProjectRelativePath().removeLastSegments(1).toOSString())) { return false; } } @@ -442,13 +445,13 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr } } if (E.notEmpty(filter.getBundles())) { - String bundle = getBundle(project); + final String bundle = getBundle(project); if (bundle == null || !filter.getBundles().contains(bundle)) { return false; } } if (!filter.isIncludeNonBundles()) { - String bundle = getBundle(project); + final String bundle = getBundle(project); if (bundle == null) { return false; } @@ -462,7 +465,7 @@ public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContr }); } - } catch (CoreException e) { + } catch (final CoreException e) { e.printStackTrace(); } } diff --git a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java index 1fcde1e2..2abd149a 100644 --- a/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java +++ b/bundles/org.eclipse.e4.tools.emf.ui/src/org/eclipse/e4/tools/emf/ui/internal/common/component/dialogs/AbstractIdDialog.java @@ -6,13 +6,14 @@ * http://www.eclipse.org/legal/epl-v10.html * * Contributors: - * Nicolaj Hoess <nicohoess@gmail.com> - initial implementation (Bug 396975) - * Andrej Brummelhuis <andrejbrummelhuis@gmail.com> - Bug 396975, 395283 - * Adrian Alcaide - initial implementation (Bug 396975) + * Nicolaj Hoess <nicohoess@gmail.com> - initial implementation (Bug 396975) + * Andrej Brummelhuis <andrejbrummelhuis@gmail.com> - Bug 396975, 395283 + * Adrian Alcaide - initial implementation (Bug 396975) *******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.common.component.dialogs; import java.util.List; + import org.eclipse.e4.tools.emf.ui.common.IModelResource; import org.eclipse.e4.tools.emf.ui.internal.Messages; import org.eclipse.e4.tools.emf.ui.internal.PatternFilter; @@ -43,7 +44,8 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; -public abstract class AbstractIdDialog<ContributionClass, ElementClass extends MApplicationElement> extends SaveDialogBoundsSettingsDialog { +public abstract class AbstractIdDialog<ContributionClass, ElementClass extends MApplicationElement> extends + SaveDialogBoundsSettingsDialog { protected EModelService modelService; @@ -53,7 +55,8 @@ public abstract class AbstractIdDialog<ContributionClass, ElementClass extends M protected ContributionClass contribution; protected Messages messages; - public AbstractIdDialog(Shell parentShell, IModelResource resource, ContributionClass toolbarContribution, EditingDomain domain, EModelService modelService, Messages Messages) { + public AbstractIdDialog(Shell parentShell, IModelResource resource, ContributionClass toolbarContribution, + EditingDomain domain, EModelService modelService, Messages Messages) { super(parentShell); this.resource = resource; this.modelService = modelService; @@ -86,13 +89,16 @@ public abstract class AbstractIdDialog<ContributionClass, ElementClass extends M @Override public void update(ViewerCell cell) { - ElementClass el = (ElementClass) cell.getElement(); - String elementId = (el.getElementId() != null && el.getElementId().trim().length() > 0) ? el.getElementId() : "(Id missing)"; //$NON-NLS-1$ - StyledString str = new StyledString(elementId); + final ElementClass el = (ElementClass) cell.getElement(); + final String elementId = el.getElementId() != null && el.getElementId().trim().length() > 0 ? el + .getElementId() : "(Id missing)"; //$NON-NLS-1$ + final StyledString str = new StyledString(elementId); - String infoString = getListItemInformation(el); + final String infoString = getListItemInformation(el); if (infoString != null && infoString.trim().length() > 0) + { str.append(" - " + getListItemInformation(el), StyledString.DECORATIONS_STYLER); //$NON-NLS-1$ + } cell.setText(str.getString()); cell.setStyleRanges(str.getStyleRanges()); @@ -105,18 +111,19 @@ public abstract class AbstractIdDialog<ContributionClass, ElementClass extends M getShell().setText(getShellTitle()); setTitle(getDialogTitle()); setMessage(getDialogMessage()); - Composite comp = (Composite) super.createDialogArea(parent); - Composite container = new Composite(comp, SWT.NONE); + final Composite comp = (Composite) super.createDialogArea(parent); + final Composite container = new Composite(comp, SWT.NONE); container.setLayoutData(new GridData(GridData.FILL_BOTH)); container.setLayout(new GridLayout(2, false)); Label l = new Label(container, SWT.NONE); l.setText(getLabelText()); - Text idField = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH); + final Text idField = new Text(container, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH); idField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); final PatternFilter filter = new PatternFilter() { + @SuppressWarnings("restriction") @Override protected boolean isParentMatch(Viewer viewer, Object element) { return viewer instanceof AbstractTreeViewer && super.isParentMatch(viewer, element); @@ -146,8 +153,8 @@ public abstract class AbstractIdDialog<ContributionClass, ElementClass extends M @Override protected void okPressed() { if (!viewer.getSelection().isEmpty()) { - ElementClass el = (ElementClass) ((IStructuredSelection) viewer.getSelection()).getFirstElement(); - Command cmd = SetCommand.create(domain, contribution, getFeatureLiteral(), el.getElementId()); + final ElementClass el = (ElementClass) ((IStructuredSelection) viewer.getSelection()).getFirstElement(); + final Command cmd = SetCommand.create(domain, contribution, getFeatureLiteral(), el.getElementId()); if (cmd.canExecute()) { domain.getCommandStack().execute(cmd); super.okPressed(); diff --git a/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF b/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF index 073063eb..88301650 100644 --- a/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.e4.tools.services/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %Bundle-Name Bundle-SymbolicName: org.eclipse.e4.tools.services Bundle-Version: 0.12.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Export-Package: org.eclipse.e4.tools.services;version="0.12.0.qualifier";x-friends:="org.eclipse.e4.tools.compat,org.eclipse.e4.tools.emf.editor3x", +Export-Package: org.eclipse.e4.tools.services;version="0.12.0.qualifier";x-friends:="org.eclipse.e4.tools.compat,org.eclipse.e4.tools.emf.editor3x,org.eclipse.e4.tools.emf.ui", org.eclipse.e4.tools.services.impl;version="0.12.0.qualifier";x-friends:="org.eclipse.e4.tools.emf.ui" Bundle-Vendor: %Bundle-Vendor Require-Bundle: org.eclipse.swt;bundle-version="3.7.0", |