diff options
author | Mike Rennie | 2013-07-16 16:57:17 +0000 |
---|---|---|
committer | Mike Rennie | 2013-07-16 16:57:17 +0000 |
commit | 44c60018da2e1e14ec6b2d0b0f2b01a71df104fc (patch) | |
tree | 45b05cd32d2c68aec0046b2204d81a0d40e5645a /org.eclipse.debug.ui | |
parent | 2123eb384fbb6bfe61a03e40ffe6836b2daf4696 (diff) | |
download | eclipse.platform.debug-44c60018da2e1e14ec6b2d0b0f2b01a71df104fc.tar.gz eclipse.platform.debug-44c60018da2e1e14ec6b2d0b0f2b01a71df104fc.tar.xz eclipse.platform.debug-44c60018da2e1e14ec6b2d0b0f2b01a71df104fc.zip |
Bug 413095 - Clean up deprecation and code warnings
Diffstat (limited to 'org.eclipse.debug.ui')
18 files changed, 661 insertions, 156 deletions
diff --git a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs index 32accb991..5d7a22fe3 100644 --- a/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.core.prefs @@ -8,6 +8,7 @@ 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.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 @@ -52,7 +53,9 @@ org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled @@ -69,6 +72,7 @@ org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignor org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error org.eclipse.jdt.core.compiler.problem.nullReference=error org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error @@ -89,6 +93,7 @@ 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 @@ -113,11 +118,292 @@ 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=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.3 org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL,HIGH,HIGH org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX,EXPERIMENTAL,CONTEXTLAUNCHING +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_annotation=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_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_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=32 +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_resources_in_try=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_union_type_in_multicatch=0 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=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_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=true +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=80 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +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/org.eclipse.debug.ui/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..13d5dca2c --- /dev/null +++ b/org.eclipse.debug.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,109 @@ +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=false +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=false +cleanup.never_use_blocks=false +cleanup.never_use_parentheses_in_expressions=true +cleanup.organize_imports=true +cleanup.qualify_static_field_accesses_with_declaring_class=false +cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +cleanup.qualify_static_member_accesses_with_declaring_class=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=true +cleanup.remove_unnecessary_nls_tags=true +cleanup.remove_unused_imports=true +cleanup.remove_unused_local_variables=false +cleanup.remove_unused_private_fields=true +cleanup.remove_unused_private_members=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=false +cleanup.use_this_for_non_static_field_access=false +cleanup.use_this_for_non_static_field_access_only_if_necessary=true +cleanup.use_this_for_non_static_method_access=false +cleanup.use_this_for_non_static_method_access_only_if_necessary=true +cleanup_profile=_Platform Debug Cleanups +cleanup_settings_version=2 +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_Platform Debug Formatting +formatter_settings_version=12 +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=true +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=true +sp_cleanup.format_source_code_changes_only=true +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=true +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=true +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=false +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=true +sp_cleanup.remove_unnecessary_nls_tags=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=true +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=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_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/org.eclipse.debug.ui/META-INF/MANIFEST.MF b/org.eclipse.debug.ui/META-INF/MANIFEST.MF index d5bbbaa64..b069c2af8 100644 --- a/org.eclipse.debug.ui/META-INF/MANIFEST.MF +++ b/org.eclipse.debug.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.debug.ui; singleton:=true -Bundle-Version: 3.9.0.qualifier +Bundle-Version: 3.9.100.qualifier Bundle-Activator: org.eclipse.debug.internal.ui.DebugUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/org.eclipse.debug.ui/pom.xml b/org.eclipse.debug.ui/pom.xml index e04d88b42..03457df19 100644 --- a/org.eclipse.debug.ui/pom.xml +++ b/org.eclipse.debug.ui/pom.xml @@ -18,6 +18,6 @@ </parent> <groupId>org.eclipse.debug</groupId> <artifactId>org.eclipse.debug.ui</artifactId> - <version>3.9.0-SNAPSHOT</version> + <version>3.9.100-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java index 93b2f7d17..12f0af24b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/DebugPerspectiveFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2006 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -35,7 +35,7 @@ public class DebugPerspectiveFactory implements IPerspectiveFactory { IFolderLayout navFolder= layout.createFolder(IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW, IPageLayout.TOP, (float) 0.45, layout.getEditorArea()); navFolder.addView(IDebugUIConstants.ID_DEBUG_VIEW); - navFolder.addPlaceholder(IPageLayout.ID_RES_NAV); + navFolder.addPlaceholder(IPageLayout.ID_PROJECT_EXPLORER); IFolderLayout toolsFolder= layout.createFolder(IInternalDebugUIConstants.ID_TOOLS_FOLDER_VIEW, IPageLayout.RIGHT, (float) 0.50, IInternalDebugUIConstants.ID_NAVIGATOR_FOLDER_VIEW); toolsFolder.addView(IDebugUIConstants.ID_VARIABLE_VIEW); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java index 107ca9876..f8bb07b1b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/actions/variables/details/DetailPaneWordWrapAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.actions.variables.details; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.IDebugHelpContextIds; import org.eclipse.debug.internal.ui.actions.ActionMessages; @@ -18,6 +20,7 @@ import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.ITextViewer; import org.eclipse.ui.PlatformUI; +import org.osgi.service.prefs.BackingStoreException; /** * An check box action that allows the word wrap property to be set, determining if the detail pane @@ -38,8 +41,6 @@ public class DetailPaneWordWrapAction extends Action { boolean prefSetting = DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP); fTextViewer.getTextWidget().setWordWrap(prefSetting); setChecked(prefSetting); - - } /* (non-Javadoc) @@ -47,8 +48,14 @@ public class DetailPaneWordWrapAction extends Action { */ public void run() { fTextViewer.getTextWidget().setWordWrap(isChecked()); - DebugUIPlugin.getDefault().getPreferenceStore().setValue(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP,isChecked()); - DebugUIPlugin.getDefault().savePluginPreferences(); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + try { + node.putBoolean(IDebugPreferenceConstants.PREF_DETAIL_PANE_WORD_WRAP, isChecked()); + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } - } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java index 845733b8a..181d6ebf4 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/commands/actions/ToggleStepFiltersAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,8 +10,10 @@ *******************************************************************************/ package org.eclipse.debug.internal.ui.commands.actions; -import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; -import org.eclipse.core.runtime.Preferences.PropertyChangeEvent; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.commands.IStepFiltersHandler; import org.eclipse.debug.internal.core.StepFilterManager; @@ -30,7 +32,7 @@ import org.eclipse.ui.IWorkbenchWindow; /** * This class provides the action for toggling step filters on or off for the debug view */ -public class ToggleStepFiltersAction extends DebugCommandAction implements IPropertyChangeListener { +public class ToggleStepFiltersAction extends DebugCommandAction implements IPreferenceChangeListener { private boolean fInitialized = !DebugUITools.isUseStepFilters(); @@ -150,7 +152,10 @@ public class ToggleStepFiltersAction extends DebugCommandAction implements IProp * Initializes the state, by adding this action as a property listener */ protected void initState() { - DebugPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugPlugin.getUniqueIdentifier()); + if (node != null) { + node.addPreferenceChangeListener(this); + } } /** @@ -158,22 +163,20 @@ public class ToggleStepFiltersAction extends DebugCommandAction implements IProp */ public void dispose() { super.dispose(); - DebugPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugPlugin.getUniqueIdentifier()); + if (node != null) { + node.removePreferenceChangeListener(this); + } } - /** - * @see org.eclipse.core.runtime.Preferences$IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent) - */ - public void propertyChange(PropertyChangeEvent event) { - if (event.getProperty().equals(StepFilterManager.PREF_USE_STEP_FILTERS)) { + public void preferenceChange(PreferenceChangeEvent event) { + if (event.getKey().equals(StepFilterManager.PREF_USE_STEP_FILTERS)) { boolean checked = DebugUITools.isUseStepFilters(); setChecked(checked); IAction action = getActionProxy(); if (action != null) { action.setChecked(checked); } - } + } } - - } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java index 0551c39fa..80585cc0e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/importexport/launchconfigurations/ExportLaunchConfigurationsWizardPage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2008 IBM Corporation and others. + * Copyright (c) 2007, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -117,7 +117,7 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { private CheckboxTreeViewer fViewer = null; private Text fFilePath = null; private Button fOverwrite = null; - + private ConfigContentProvider fContentProvider = null; /** * Constructor */ @@ -157,7 +157,8 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { fViewer = new CheckboxTreeViewer(tree); fViewer.setLabelProvider(DebugUITools.newDebugModelPresentation()); fViewer.setComparator(new WorkbenchViewerComparator()); - fViewer.setContentProvider(new ConfigContentProvider()); + fContentProvider = new ConfigContentProvider(); + fViewer.setContentProvider(fContentProvider); fViewer.setInput(DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurationTypes()); //we don't want to see builders.... fViewer.addFilter(new LaunchCategoryFilter(IInternalDebugUIConstants.ID_EXTERNAL_TOOL_BUILDER_LAUNCH_CATEGORY)); @@ -174,14 +175,20 @@ public class ExportLaunchConfigurationsWizardPage extends WizardPage { Button button = SWTFactory.createPushButton(buttoncomp, WizardMessages.ExportLaunchConfigurationsWizardPage_8, null); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - fViewer.setAllChecked(true); + Object[] items = fContentProvider.getElements(fViewer.getInput()); + for (int i = 0; i < items.length; i++) { + fViewer.setSubtreeChecked(items[i], true); + } setPageComplete(isComplete()); } }); button = SWTFactory.createPushButton(buttoncomp, WizardMessages.ExportLaunchConfigurationsWizardPage_9, null); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { - fViewer.setAllChecked(false); + Object[] items = fContentProvider.getElements(fViewer.getInput()); + for (int i = 0; i < items.length; i++) { + fViewer.setSubtreeChecked(items[i], false); + } setPageComplete(isComplete()); } }); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IPersistableDebugElement.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IPersistableDebugElement.java index 338db1a96..70bf29578 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IPersistableDebugElement.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/memory/IPersistableDebugElement.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005 IBM Corporation and others. + * Copyright (c) 2005, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -12,7 +12,6 @@ package org.eclipse.debug.internal.ui.memory; import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; /** * Represents an element that is capable of persisting properties. @@ -47,17 +46,4 @@ public interface IPersistableDebugElement { */ public boolean supportsProperty(Object context, String propertyId); - /** - * Add the property change listener to the persistable. The listener will - * be notified when properties have changed from the peristable element. - * @param listener is the listener to add - */ - public void addPropertyChangeListener(IPropertyChangeListener listener); - - /** - * Remove the property change listener from the persistable. The listener will - * no longer be notified when properties are changed from the persistable element. - * @param listener is the listener to remove - */ - public void removePropertyChangeListener(IPropertyChangeListener listener); } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java index 24fc22883..1f342680b 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/LaunchPerspectivePreferencePage.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2012 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -361,6 +361,9 @@ public class LaunchPerspectivePreferencePage extends PreferencePage implements I String modeString= fmodes.size() == 1 ? fmodes.get(0).toString() : fmodes.toString(); SWTFactory.createLabel(parent, modeString + ":", 1); //$NON-NLS-1$ combo = SWTFactory.createCombo(parent, SWT.READ_ONLY, 1, fgPerspectiveLabels); + if(combo == null) { + continue; + } String text = getComboSelection(smodes); if(text != null) { combo.setText(text); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java index 239ed8bf3..829ae860e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/model/InternalTreeModelViewer.java @@ -76,11 +76,10 @@ import org.eclipse.ui.IMemento; * * @since 3.3 */ -public class InternalTreeModelViewer extends TreeViewer - implements IInternalTreeModelViewer, org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer +public class InternalTreeModelViewer extends TreeViewer implements IInternalTreeModelViewer, org.eclipse.debug.internal.ui.viewers.model.ITreeModelViewer { - private IPresentationContext fContext; + private final IPresentationContext fContext; /** * Current column presentation or <code>null</code> @@ -91,25 +90,25 @@ public class InternalTreeModelViewer extends TreeViewer * Map of columns presentation id to its visible columns id's (String[]) * When a columns presentation is not in the map, default settings are used. */ - private Map fVisibleColumns = new HashMap(); + private final Map fVisibleColumns = new HashMap(); /** * Map of column id's to persisted sizes */ - private Map fColumnSizes = new HashMap(); + private final Map fColumnSizes = new HashMap(); /** * Map of column presentation id's to an array of integers representing the column order * for that presentation, or <code>null</code> if default. */ - private Map fColumnOrder = new HashMap(); + private final Map fColumnOrder = new HashMap(); /** * Map of column presentation id to whether columns should be displayed * for that presentation (the user can toggle columns on/off when a * presentation is optional. */ - private Map fShowColumns = new HashMap(); + private final Map fShowColumns = new HashMap(); /** * Item's tree path cache @@ -176,7 +175,7 @@ public class InternalTreeModelViewer extends TreeViewer } } - private ColumnListener fListener = new ColumnListener(); + private final ColumnListener fListener = new ColumnListener(); /** * Proxy to cell modifier/editor support @@ -259,7 +258,7 @@ public class InternalTreeModelViewer extends TreeViewer } - private CellModifierProxy fCellModifier; + private final CellModifierProxy fCellModifier; /** @@ -739,8 +738,9 @@ public class InternalTreeModelViewer extends TreeViewer int treeWidgetWidth = tree.getSize().x; int avg = treeWidgetWidth; - if (visibleColumnIds != null) - avg /= visibleColumnIds.length; + if (visibleColumnIds != null) { + avg /= visibleColumnIds.length; + } if (avg == 0) { tree.addPaintListener(new PaintListener() { @@ -809,7 +809,9 @@ public class InternalTreeModelViewer extends TreeViewer for (int i = 0; i < columns.length; i++) { boolean columnAvailable = false; for (int j = 0; j < available.length; j++) { - if (columns[i].equals(available[j])) columnAvailable = true; + if (columns[i].equals(available[j])) { + columnAvailable = true; + } } if (!columnAvailable || presentation.getHeader(columns[i]) == null) { diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java index 2f29050b3..d4bcd72ba 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java @@ -30,8 +30,10 @@ import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IConfigurationElement; import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.Platform; -import org.eclipse.core.runtime.Preferences.IPropertyChangeListener; -import org.eclipse.core.runtime.Preferences.PropertyChangeEvent; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.ILaunch; import org.eclipse.debug.core.ILaunchConfiguration; @@ -68,17 +70,17 @@ import org.w3c.dom.NodeList; * * @since 3.2 */ -public class ViewContextService implements IDebugContextListener, IPerspectiveListener4, IPropertyChangeListener, IContextManagerListener { +public class ViewContextService implements IDebugContextListener, IPerspectiveListener4, IPreferenceChangeListener, IContextManagerListener { /** * Maps the perspectives in this window to its last activated workbench context */ - private Map fPerspectiveToActiveContext = new HashMap(); + private final Map fPerspectiveToActiveContext = new HashMap(); /** * Map of the perspectives to all workbench contexts activated in that perspective */ - private Map fPerspectiveToActivatedContexts = new HashMap(); + private final Map fPerspectiveToActivatedContexts = new HashMap(); /** * Map of context id's to context view bindings @@ -101,9 +103,9 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi */ private IWorkbenchWindow fWindow; - private IContextService fContextService; + private final IContextService fContextService; - private IDebugContextService fDebugContextService; + private final IDebugContextService fDebugContextService; /** * Perspective that is currently being de-activated. Used to determine @@ -156,7 +158,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi private class DebugContextViewBindings { // context id - private String fId; + private final String fId; // list of view bindings id's specific to this context private String[] fViewBindingIds = EMPTY_IDS; @@ -164,7 +166,7 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi // all bindings including inherited bindings, top down in activation order private String[] fAllViewBindingIds = null; // associated binding to activate - private Map fAllViewIdToBindings = new HashMap(); + private final Map fAllViewIdToBindings = new HashMap(); // all context id's in this context hierarchy (top down order) private String[] fAllConetxtIds = null; @@ -367,19 +369,19 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi * Information for a view */ private class ViewBinding { - private IConfigurationElement fElement; + private final IConfigurationElement fElement; /** * Set of perspectives this view was opened in by the user */ - private Set fUserOpened = new HashSet(); + private final Set fUserOpened = new HashSet(); /** * Set of perspectives this view was closed in by the user */ - private Set fUserClosed = new HashSet(); + private final Set fUserClosed = new HashSet(); /** * Set of perspectives this view was auto-opened by view management. */ - private Set fAutoOpened = new HashSet(); + private final Set fAutoOpened = new HashSet(); public ViewBinding(IConfigurationElement element) { fElement = element; @@ -623,7 +625,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi loadPerspectives(); window.addPerspectiveListener(this); getDebugContextService().addDebugContextListener(this); - DebugUIPlugin.getDefault().getPluginPreferences().addPropertyChangeListener(this); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if (node != null) { + node.addPreferenceChangeListener(this); + } fContextService.addContextManagerListener(this); if (fWindow != null) { IWorkbenchPage page = fWindow.getActivePage(); @@ -637,7 +642,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi fWindow.removePerspectiveListener(this); fWindow = null; // avoid leaking a window reference (bug 321658). getDebugContextService().removeDebugContextListener(this); - DebugUIPlugin.getDefault().getPluginPreferences().removePropertyChangeListener(this); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if (node != null) { + node.removePreferenceChangeListener(this); + } fContextService.removeContextManagerListener(this); fActivePerspective = null; } @@ -713,24 +721,6 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi } } - /* (non-Javadoc) - * @see org.eclipse.core.runtime.Preferences.IPropertyChangeListener#propertyChange(org.eclipse.core.runtime.Preferences.PropertyChangeEvent) - */ - public void propertyChange(PropertyChangeEvent event) { - if (!fIgnoreChanges) { - if (IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES.equals(event.getProperty())) { - loadPerspectives(); - } else if (IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS.equals(event.getProperty())) { - loadContextToViewExtensions(); - applyUserViewBindings(); - // clear activations to re-enable activation based on new settings - fPerspectiveToActivatedContexts.clear(); - ISelection selection = getDebugContextService().getActiveContext(); - contextActivated(selection); - } - } - } - /** * Returns whether this service's window's active perspective supports view management. * @@ -1002,7 +992,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi * @param perspective the perspective description */ private void activateChain(String contextId, IPerspectiveDescriptor perspective, Set allViewIds) { - if (fWindow == null) return; // disposed + if (fWindow == null) + { + return; // disposed + } IWorkbenchPage page = fWindow.getActivePage(); if (page != null) { @@ -1014,7 +1007,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi } private Set getAllContextsViewIDs(List contextsIds) { - if (fWindow == null) return Collections.EMPTY_SET; // disposed + if (fWindow == null) + { + return Collections.EMPTY_SET; // disposed + } TreeSet viewIds = new TreeSet(); for (int i = 0; i < contextsIds.size(); i++) { @@ -1087,7 +1083,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi } private void deactivate(String contextId, IPerspectiveDescriptor perspective) { - if (fWindow == null) return; // disposed + if (fWindow == null) + { + return; // disposed + } IWorkbenchPage page = fWindow.getActivePage(); if (page != null) { @@ -1166,7 +1165,10 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi * @param viewId the id of the view to show */ public void showViewQuiet(String viewId) { - if (fWindow == null) return; // disposed; + if (fWindow == null) + { + return; // disposed; + } IWorkbenchPage page = fWindow.getActivePage(); if (page != null) { @@ -1193,4 +1195,20 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi clean(perspective); } } + + public void preferenceChange(PreferenceChangeEvent event) { + if (!fIgnoreChanges) { + if (IDebugUIConstants.PREF_MANAGE_VIEW_PERSPECTIVES.equals(event.getKey())) { + loadPerspectives(); + } else if (IInternalDebugUIConstants.PREF_USER_VIEW_BINDINGS.equals(event.getKey())) { + loadContextToViewExtensions(); + applyUserViewBindings(); + // clear activations to re-enable activation based on new + // settings + fPerspectiveToActivatedContexts.clear(); + ISelection selection = getDebugContextService().getActiveContext(); + contextActivated(selection); + } + } + } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java index ddb2bc4b7..1725bd43e 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointSetOrganizer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -23,6 +23,8 @@ import org.eclipse.core.resources.IMarker; import org.eclipse.core.resources.IMarkerDelta; import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IBreakpointManager; import org.eclipse.debug.core.IBreakpointsListener; @@ -40,6 +42,7 @@ import org.eclipse.jface.util.PropertyChangeEvent; import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.IWorkingSetManager; import org.eclipse.ui.PlatformUI; +import org.osgi.service.prefs.BackingStoreException; /** * Breakpoint organizers for breakpoint working sets. @@ -322,7 +325,15 @@ public class BreakpointSetOrganizer extends AbstractBreakpointOrganizerDelegate } } fDefaultWorkingSet = set; - DebugUIPlugin.getDefault().getPluginPreferences().setValue(IInternalDebugUIConstants.MEMENTO_BREAKPOINT_WORKING_SET_NAME, name); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + try { + node.put(IInternalDebugUIConstants.MEMENTO_BREAKPOINT_WORKING_SET_NAME, name); + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } /* diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java index 012236f7a..d6001e865 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/MemoryView.java @@ -20,7 +20,9 @@ import org.eclipse.core.commands.AbstractHandler; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.runtime.IAdaptable; -import org.eclipse.core.runtime.Preferences; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.internal.ui.DebugUIMessages; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.internal.ui.views.variables.VariablesViewMessages; @@ -65,6 +67,7 @@ import org.eclipse.ui.commands.ICommandService; import org.eclipse.ui.contexts.IContextService; import org.eclipse.ui.handlers.IHandlerService; import org.eclipse.ui.part.ViewPart; +import org.osgi.service.prefs.BackingStoreException; /** * @@ -656,37 +659,41 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 { return fVisibleViewPanes.contains(paneId); } - private void storeViewPaneVisibility() - { + private void storeViewPaneVisibility() { fVisibleViewPanes.clear(); - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); StringBuffer visibleViewPanes= new StringBuffer(); Enumeration enumeration = fViewPaneControls.keys(); - while (enumeration.hasMoreElements()) - { + while (enumeration.hasMoreElements()) { String paneId = (String)enumeration.nextElement(); Control control = (Control)fViewPaneControls.get(paneId); - if (control.isVisible()) - { + if (control.isVisible()) { visibleViewPanes.append(paneId); visibleViewPanes.append(","); //$NON-NLS-1$ fVisibleViewPanes.add(paneId); } } - - prefs.setValue(getVisibilityPrefId(), visibleViewPanes.toString()); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + try { + node.put(getVisibilityPrefId(), visibleViewPanes.toString()); + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } - private void loadViewPanesVisibility() - { - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); - String visiblePanes = prefs.getString(getVisibilityPrefId()); - - if (visiblePanes != null && visiblePanes.length() > 0) - { + private void loadViewPanesVisibility() { + String visiblePanes = Platform.getPreferencesService().getString( + DebugUIPlugin.getUniqueIdentifier(), + getVisibilityPrefId(), + null, + null); + + if (visiblePanes != null && visiblePanes.length() > 0) { StringTokenizer tokenizer = new StringTokenizer(visiblePanes, ","); //$NON-NLS-1$ while (tokenizer.hasMoreTokens()) { @@ -694,8 +701,7 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 { fVisibleViewPanes.add(paneId); } } - else - { + else { for (int i=0 ;i<defaultVisiblePaneIds.length; i++) { fVisibleViewPanes.add(defaultVisiblePaneIds[i]); @@ -720,13 +726,14 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 { fSashForm.layout(); } - private void loadOrientation() - { - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); - fViewOrientation = prefs.getInt(getOrientationPrefId()); - - for (int i=0; i<fOrientationActions.length; i++) - { + private void loadOrientation() { + fViewOrientation = Platform.getPreferencesService().getInt( + DebugUIPlugin.getUniqueIdentifier(), + getOrientationPrefId(), + HORIZONTAL_VIEW_ORIENTATION, + null); + + for (int i=0; i<fOrientationActions.length; i++) { if (fOrientationActions[i].getOrientation() == fViewOrientation) { fOrientationActions[i].run(); @@ -735,10 +742,16 @@ public class MemoryView extends ViewPart implements IMemoryRenderingSite2 { updateOrientationActions(); } - private void saveOrientation() - { - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); - prefs.setValue(getOrientationPrefId(), fViewOrientation); + private void saveOrientation() { + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + try { + node.putInt(getOrientationPrefId(), fViewOrientation); + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } private void updateOrientationActions() diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java index a8c040c29..e20a18ee3 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/ViewPaneRenderingMgr.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2004, 2007 IBM Corporation and others. + * Copyright (c) 2004, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -17,7 +17,10 @@ import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; import org.eclipse.core.runtime.CoreException; -import org.eclipse.core.runtime.Preferences; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.preferences.DefaultScope; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugEvent; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.IDebugEventSetListener; @@ -33,6 +36,7 @@ import org.eclipse.debug.ui.memory.IMemoryRenderingSite; import org.eclipse.debug.ui.memory.IMemoryRenderingType; import org.eclipse.ui.IViewSite; import org.eclipse.ui.IWorkbenchPartSite; +import org.osgi.service.prefs.BackingStoreException; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -50,8 +54,8 @@ import org.w3c.dom.NodeList; */ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ - private ArrayList fRenderings = new ArrayList(); - private IMemoryRenderingContainer fViewPane; + private final ArrayList fRenderings = new ArrayList(); + private final IMemoryRenderingContainer fViewPane; private static final String RENDERINGS_TAG = "persistedMemoryRenderings"; //$NON-NLS-1$ private static final String MEMORY_RENDERING_TAG = "memoryRendering"; //$NON-NLS-1$ @@ -66,8 +70,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ public void removeMemoryBlockRendering(IMemoryBlock mem, String renderingId) { - if(fRenderings == null) + if(fRenderings == null) { return; + } IMemoryRendering[] toRemove = getRenderings(mem, renderingId); @@ -89,8 +94,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ public void addMemoryBlockRendering(IMemoryRendering rendering) { // do not allow duplicated objects - if (fRenderings.contains(rendering)) + if (fRenderings.contains(rendering)) { return; + } fRenderings.add(rendering); @@ -105,11 +111,13 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ public void removeMemoryBlockRendering(IMemoryRendering rendering) { - if(rendering == null) + if(rendering == null) { return; + } - if(!fRenderings.contains(rendering)) + if(!fRenderings.contains(rendering)) { return; + } fRenderings.remove(rendering); @@ -191,8 +199,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ public void handleDebugEvents(DebugEvent[] events) { - for (int i=0; i < events.length; i++) + for (int i=0; i < events.length; i++) { handleDebugEvent(events[i]); + } } @@ -226,12 +235,18 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ fRenderings.clear(); String secondaryId = getViewSiteSecondaryId(); - if (secondaryId != null) - { + if (secondaryId != null) { // do not save renderings if this is not the primary rendering view String prefid = getPrefId(); - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); - prefs.setToDefault(prefid); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if (node != null) { + node.remove(prefid); + try { + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } DebugPlugin.getDefault().removeDebugEventListener(this); @@ -243,7 +258,6 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ */ private void storeRenderings() { - Preferences prefs = DebugUIPlugin.getDefault().getPluginPreferences(); String renderingsStr= IInternalDebugCoreConstants.EMPTY_STRING; try { renderingsStr= getRenderingsAsXML(); @@ -256,11 +270,23 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ } String prefid = getPrefId(); - - if (renderingsStr != null) - prefs.setValue(prefid, renderingsStr); - else - prefs.setToDefault(prefid); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + if (renderingsStr != null) { + node.put(prefid, renderingsStr); + } + else { + IEclipsePreferences def = DefaultScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(def != null) { + node.put(prefid, def.get(prefid, IInternalDebugCoreConstants.EMPTY_STRING)); + } + } + try { + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } private String getPrefId() { @@ -295,8 +321,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ private String getRenderingsAsXML() throws IOException, ParserConfigurationException, TransformerException { IMemoryRendering[] renderings= (IMemoryRendering[])fRenderings.toArray(new IMemoryRendering[fRenderings.size()]); - if (renderings.length == 0) + if (renderings.length == 0) { return null; + } Document document= LaunchManager.getDocument(); Element rootElement= document.createElement(RENDERINGS_TAG); @@ -315,7 +342,11 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ * Load renderings currently stored. */ private void loadPersistedRenderings(String prefId) { - String renderingsStr= DebugUIPlugin.getDefault().getPluginPreferences().getString(prefId); + String renderingsStr = Platform.getPreferencesService().getString( + DebugUIPlugin.getUniqueIdentifier(), + prefId, + "", //$NON-NLS-1$ + null); if (renderingsStr.length() == 0) { return; } @@ -347,8 +378,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ IMemoryBlock memoryBlock = null; for (int j=0; j<memoryBlocks.length; j++) { - if (Integer.toString(memoryBlocks[j].hashCode()).equals(memoryBlockHashCode)) + if (Integer.toString(memoryBlocks[j].hashCode()).equals(memoryBlockHashCode)) { memoryBlock = memoryBlocks[j]; + } } if (memoryBlock != null) @@ -357,8 +389,9 @@ public class ViewPaneRenderingMgr implements IDebugEventSetListener{ IMemoryRenderingType type = null; for (int k=0; k<types.length; k++) { - if (types[k].getId().equals(renderingId)) + if (types[k].getId().equals(renderingId)) { type = types[k]; + } } // if memory block is not found, the rendering is no longer valid diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java index d865d8bd4..23b1c4002 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/variables/details/DetailPaneManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2011 IBM Corporation and others. + * Copyright (c) 2006, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -33,12 +33,15 @@ import org.eclipse.core.runtime.IExtensionPoint; import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.internal.core.IConfigurationElementConstants; import org.eclipse.debug.internal.ui.DebugUIPlugin; import org.eclipse.debug.ui.IDebugUIConstants; import org.eclipse.debug.ui.IDetailPane; import org.eclipse.debug.ui.IDetailPaneFactory; import org.eclipse.jface.viewers.IStructuredSelection; +import org.osgi.service.prefs.BackingStoreException; /** * Organizes the detail factories contributed through the extension point and keeps @@ -499,7 +502,15 @@ public class DetailPaneManager { buffer.append(entry.getValue()); buffer.append('|'); } - DebugUIPlugin.getDefault().getPluginPreferences().setValue(PREF_DETAIL_AREAS, buffer.toString()); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + node.put(PREF_DETAIL_AREAS, buffer.toString()); + try { + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } /** @@ -509,7 +520,10 @@ public class DetailPaneManager { */ private void loadPreferredDetailsAreas() { fPreferredDetailPanes = new HashMap(); - String preferenceValue = DebugUIPlugin.getDefault().getPluginPreferences().getString(PREF_DETAIL_AREAS); + String preferenceValue = Platform.getPreferencesService().getString(DebugUIPlugin.getUniqueIdentifier(), + PREF_DETAIL_AREAS, + "", //$NON-NLS-1$ + null); StringTokenizer entryTokenizer = new StringTokenizer(preferenceValue,"|"); //$NON-NLS-1$ while (entryTokenizer.hasMoreTokens()){ String token = entryTokenizer.nextToken(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java index 90d5babe2..c0c71c341 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -13,6 +13,8 @@ package org.eclipse.debug.ui; import java.util.List; import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.InstanceScope; import org.eclipse.debug.core.DebugPlugin; import org.eclipse.debug.core.model.IExpression; import org.eclipse.debug.internal.ui.DebugUIPlugin; @@ -50,6 +52,7 @@ import org.eclipse.ui.IViewPart; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.PartInitException; +import org.osgi.service.prefs.BackingStoreException; /** * A <code>DebugPopup</code> that can be used to inspect an @@ -194,7 +197,15 @@ public class InspectPopupDialog extends DebugPopup { int[] weights = fSashForm.getWeights(); if (weights.length == 2){ String weightString = weights[0] + ":" + weights[1]; //$NON-NLS-1$ - DebugUIPlugin.getDefault().getPluginPreferences().setValue(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString); + IEclipsePreferences node = InstanceScope.INSTANCE.getNode(DebugUIPlugin.getUniqueIdentifier()); + if(node != null) { + node.put(PREF_INSPECT_POPUP_SASH_WEIGHTS, weightString); + try { + node.flush(); + } catch (BackingStoreException e) { + DebugUIPlugin.log(e); + } + } } } } diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java index 2599e5477..5e94b9d18 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/ImportBreakpointsOperation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2013 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -182,7 +182,9 @@ public class ImportBreakpointsOperation implements IRunnableWithProgress { return; } attributes = collectBreakpointProperties(nodes[i]); - + if(attributes == null) { + continue; + } IResource resource; if(fImportBreakpoints) { resource = workspace.findMember((String) attributes.get(IImportExportConstants.IE_NODE_PATH)); |