Backport code changes from RCP
diff --git a/bundles/org.eclipse.rap.pde.runtime/.classpath b/bundles/org.eclipse.rap.pde.runtime/.classpath
index 2fbb7a2..ad32c83 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.classpath
+++ b/bundles/org.eclipse.rap.pde.runtime/.classpath
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="output" path="bin"/>
diff --git a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.core.resources.prefs
index 1dbea0b..fc21a08 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.core.resources.prefs
+++ b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.core.resources.prefs
@@ -1,7 +1,6 @@
-#Fri Oct 20 13:22:13 EDT 2006

-eclipse.preferences.version=1

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/default.permissions=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/implied.permissions=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/osname.aliases=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/processor.aliases=UTF-8

-encoding/<project>=ISO-8859-1

+eclipse.preferences.version=1
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/default.permissions=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/implied.permissions=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/osname.aliases=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/processor.aliases=UTF-8
+encoding/<project>=UTF-8
diff --git a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.core.prefs
index 68b4fae..62ec106 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.core.prefs
@@ -1,6 +1,393 @@
 eclipse.preferences.version=1

-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2

-org.eclipse.jdt.core.compiler.compliance=1.4

-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning

-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning

-org.eclipse.jdt.core.compiler.source=1.3

+org.eclipse.jdt.core.builder.cleanOutputFolder=clean

+org.eclipse.jdt.core.builder.duplicateResourceTask=warning

+org.eclipse.jdt.core.builder.invalidClasspath=abort

+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore

+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch

+org.eclipse.jdt.core.circularClasspath=error

+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled

+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled

+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

+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=1000

+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning

+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error

+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore

+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning

+org.eclipse.jdt.core.compiler.problem.deadCode=error

+org.eclipse.jdt.core.compiler.problem.deprecation=warning

+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled

+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.explicitlyClosedAutoCloseable=ignore

+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore

+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled

+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning

+org.eclipse.jdt.core.compiler.problem.finalParameterBound=ignore

+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=error

+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning

+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled

+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private

+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore

+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning

+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore

+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore

+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=enabled

+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.missingJavadocTagsOverriding=enabled

+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public

+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore

+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled

+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning

+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore

+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning

+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning

+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning

+org.eclipse.jdt.core.compiler.problem.nullReference=error

+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning

+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore

+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning

+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore

+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore

+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning

+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning

+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore

+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore

+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore

+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore

+org.eclipse.jdt.core.compiler.problem.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.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=warning

+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning

+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning

+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning

+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled

+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled

+org.eclipse.jdt.core.compiler.problem.unusedImport=error

+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning

+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning

+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore

+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled

+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled

+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error

+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.formatter.align_type_members_on_columns=false

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16

+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_assignment=0

+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16

+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16

+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80

+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=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=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

+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0

+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1

+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1

+org.eclipse.jdt.core.formatter.blank_lines_before_method=1

+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1

+org.eclipse.jdt.core.formatter.blank_lines_before_package=0

+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1

+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1

+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line

+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false

+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false

+org.eclipse.jdt.core.formatter.comment.format_block_comments=true

+org.eclipse.jdt.core.formatter.comment.format_header=false

+org.eclipse.jdt.core.formatter.comment.format_html=true

+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true

+org.eclipse.jdt.core.formatter.comment.format_line_comments=true

+org.eclipse.jdt.core.formatter.comment.format_source_code=true

+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true

+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true

+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert

+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert

+org.eclipse.jdt.core.formatter.comment.line_length=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=false

+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_after_type_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert

+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert

+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert

+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert

+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert

+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert

+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert

+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert

+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert

+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert

+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert

+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert

+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert

+org.eclipse.jdt.core.formatter.join_lines_in_comments=true

+org.eclipse.jdt.core.formatter.join_wrapped_lines=true

+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false

+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false

+org.eclipse.jdt.core.formatter.lineSplit=120

+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false

+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0

+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1

+org.eclipse.jdt.core.formatter.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

+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter

diff --git a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.launching.prefs b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.launching.prefs
index 78562bc..08eb112 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.launching.prefs
+++ b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.launching.prefs
@@ -1,3 +1,3 @@
-#Mon Oct 13 14:57:59 CDT 2008

-eclipse.preferences.version=1

-org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning

+#Mon Oct 13 14:57:59 CDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.launching.PREF_STRICTLY_COMPATIBLE_JRE_NOT_AVAILABLE=warning
diff --git a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.ui.prefs
index 637ce4f..01c4a76 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.jdt.ui.prefs
@@ -1,60 +1,66 @@
-#Mon Oct 13 14:57:58 CDT 2008

-eclipse.preferences.version=1

-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true

-formatter_profile=_core

-formatter_settings_version=11

-org.eclipse.jdt.ui.ignorelowercasenames=true

-org.eclipse.jdt.ui.importorder=;

-org.eclipse.jdt.ui.ondemandthreshold=3

-org.eclipse.jdt.ui.staticondemandthreshold=99

-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_serial_version_id=false

-sp_cleanup.always_use_blocks=true

-sp_cleanup.always_use_parentheses_in_expressions=false

-sp_cleanup.always_use_this_for_non_static_field_access=false

-sp_cleanup.always_use_this_for_non_static_method_access=false

-sp_cleanup.convert_to_enhanced_for_loop=false

-sp_cleanup.correct_indentation=false

-sp_cleanup.format_source_code=true

-sp_cleanup.format_source_code_changes_only=false

-sp_cleanup.make_local_variable_final=false

-sp_cleanup.make_parameters_final=false

-sp_cleanup.make_private_fields_final=true

-sp_cleanup.make_type_abstract_if_missing_method=false

-sp_cleanup.make_variable_declarations_final=true

-sp_cleanup.never_use_blocks=false

-sp_cleanup.never_use_parentheses_in_expressions=true

-sp_cleanup.on_save_use_additional_actions=false

-sp_cleanup.organize_imports=true

-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false

-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false

-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false

-sp_cleanup.remove_private_constructors=true

-sp_cleanup.remove_trailing_whitespaces=false

-sp_cleanup.remove_trailing_whitespaces_all=true

-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false

-sp_cleanup.remove_unnecessary_casts=true

-sp_cleanup.remove_unnecessary_nls_tags=false

-sp_cleanup.remove_unused_imports=false

-sp_cleanup.remove_unused_local_variables=false

-sp_cleanup.remove_unused_private_fields=true

-sp_cleanup.remove_unused_private_members=false

-sp_cleanup.remove_unused_private_methods=true

-sp_cleanup.remove_unused_private_types=true

-sp_cleanup.sort_members=false

-sp_cleanup.sort_members_all=false

-sp_cleanup.use_blocks=false

-sp_cleanup.use_blocks_only_for_return_and_throw=false

-sp_cleanup.use_parentheses_in_expressions=false

-sp_cleanup.use_this_for_non_static_field_access=false

-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

-sp_cleanup.use_this_for_non_static_method_access=false

-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.staticondemandthreshold=99
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+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=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=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
+sp_cleanup.use_type_arguments=false
diff --git a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.pde.prefs
index ac138a5..88a12c6 100644
--- a/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.pde.prefs
+++ b/bundles/org.eclipse.rap.pde.runtime/.settings/org.eclipse.pde.prefs
@@ -1,16 +1,34 @@
-#Wed Jan 02 09:57:24 CST 2008

-compilers.incompatible-environment=1

-compilers.p.build=1

-compilers.p.deprecated=1

-compilers.p.missing-bundle-classpath-entries=0

-compilers.p.missing-packages=0

-compilers.p.no-required-att=0

-compilers.p.not-externalized-att=0

-compilers.p.unknown-attribute=1

-compilers.p.unknown-class=0

-compilers.p.unknown-element=1

-compilers.p.unknown-resource=0

-compilers.p.unresolved-ex-points=0

-compilers.p.unresolved-import=0

-compilers.use-project=true

-eclipse.preferences.version=1

+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=0
+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=1
+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.matching-pom-version=0
+compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.rap.pde.runtime/about.html b/bundles/org.eclipse.rap.pde.runtime/about.html
index e52bf6e..4602330 100644
--- a/bundles/org.eclipse.rap.pde.runtime/about.html
+++ b/bundles/org.eclipse.rap.pde.runtime/about.html
@@ -1,28 +1,28 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

-<html xmlns="http://www.w3.org/1999/xhtml">

-<head>

-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>

-<title>About</title>

-</head>

-<body lang="EN-US">

-<h2>About This Content</h2>

- 

-<p>June 2, 2006</p>	

-<h3>License</h3>

-

-<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 

-indicated below, the Content is provided to you under the terms and conditions of the

-Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 

-at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.

-For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>

-

-<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 

-being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may

-apply to your use of any object code in the Content.  Check the Redistributor's license that was 

-provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise

-indicated below, the terms and conditions of the EPL still apply to any source code in the Content

-and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>

-

-</body>

+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+ 
+<p>June 2, 2006</p>	
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;).  Unless otherwise 
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;).  A copy of the EPL is available 
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is 
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content.  Check the Redistributor's license that was 
+provided with the Content.  If no such license exists, contact the Redistributor.  Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org">http://www.eclipse.org</a>.</p>
+
+</body>
 </html>
\ No newline at end of file
diff --git a/bundles/org.eclipse.rap.pde.runtime/plugin.properties b/bundles/org.eclipse.rap.pde.runtime/plugin.properties
index 591a74b..1439826 100644
--- a/bundles/org.eclipse.rap.pde.runtime/plugin.properties
+++ b/bundles/org.eclipse.rap.pde.runtime/plugin.properties
@@ -1,25 +1,25 @@
-###############################################################################

-# Copyright (c) 2000, 2010 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

-# http://www.eclipse.org/legal/epl-v10.html

-#

-# Contributors:

-#     IBM Corporation - initial API and implementation

-###############################################################################

-#

-# plugin.xml properties

-#

-

-name = PDE Runtime

-provider-name = Eclipse.org

-

-views.category.name = Plug-in Development

-views.registry.name= Plug-in Registry

-

-spy-category.name = Spy

-spy-command.name = Plug-in Selection Spy

-spy-command.description = Show the Plug-in Spy

-spy-menu-command.name = Plug-in Menu Spy

-

+###############################################################################
+# Copyright (c) 2000, 2010 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
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+#
+# plugin.xml properties
+#
+
+name = PDE Runtime
+provider-name = Eclipse.org
+
+views.category.name = Plug-in Development
+views.registry.name= Plug-in Registry
+
+spy-category.name = Spy
+spy-command.name = Plug-in Selection Spy
+spy-command.description = Show the Plug-in Spy
+spy-menu-command.name = Plug-in Menu Spy
+
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/IHelpContextIds.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/IHelpContextIds.java
index bdf4471..bdbdb9d 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/IHelpContextIds.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/IHelpContextIds.java
@@ -1,18 +1,19 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime;

-

-public interface IHelpContextIds {

-

-  public static final String PREFIX = "org.eclipse.pde.doc.user" + "."; //$NON-NLS-1$ //$NON-NLS-2$

-  public static final String REGISTRY_VIEW = PREFIX + "registry_view"; //$NON-NLS-1$

-  public static final String SPY_DIALOG = PREFIX + "spy_dialog"; //$NON-NLS-1$

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime;
+
+public interface IHelpContextIds {
+	public static final String PREFIX = "org.eclipse.pde.doc.user" + "."; //$NON-NLS-1$ //$NON-NLS-2$
+
+	public static final String REGISTRY_VIEW = PREFIX + "registry_view"; //$NON-NLS-1$
+	public static final String SPY_DIALOG = PREFIX + "spy_dialog"; //$NON-NLS-1$
+
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/OverlayIcon.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/OverlayIcon.java
index 8ff22db..d61f56c 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/OverlayIcon.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/OverlayIcon.java
@@ -1,117 +1,119 @@
-/*******************************************************************************

- *  Copyright (c) 2000, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime;

-

-import org.eclipse.jface.resource.CompositeImageDescriptor;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.swt.graphics.ImageData;

-import org.eclipse.swt.graphics.Point;

-

-

-public class OverlayIcon extends CompositeImageDescriptor {

-

-  static final int DEFAULT_WIDTH = 16;

-  static final int DEFAULT_HEIGHT = 16;

-  private Point fSize = null;

-  private ImageDescriptor fBase;

-  private ImageDescriptor fOverlays[][];

-

-  public OverlayIcon( ImageDescriptor base, ImageDescriptor[][] overlays ) {

-    fBase = base;

-    if( fBase == null )

-      fBase = ImageDescriptor.getMissingImageDescriptor();

-    fOverlays = overlays;

-    fSize = new Point( DEFAULT_WIDTH, DEFAULT_HEIGHT );

-  }

-

-  public OverlayIcon( ImageDescriptor base, ImageDescriptor[][] overlays, Point size ) {

-    fBase = base;

-    if( fBase == null )

-      fBase = ImageDescriptor.getMissingImageDescriptor();

-    fOverlays = overlays;

-    fSize = size;

-  }

-

-  protected void drawBottomLeft( ImageDescriptor[] overlays ) {

-    if( overlays == null )

-      return;

-    int length = overlays.length;

-    int x = 0;

-    for( int i = 0; i < 3; i++ ) {

-      if( i < length && overlays[ i ] != null ) {

-        ImageData id = overlays[ i ].getImageData();

-        drawImage( id, x, getSize().y - id.height );

-        x += id.width;

-      }

-    }

-  }

-

-  protected void drawBottomRight( ImageDescriptor[] overlays ) {

-    if( overlays == null )

-      return;

-    int length = overlays.length;

-    int x = getSize().x;

-    for( int i = 2; i >= 0; i-- ) {

-      if( i < length && overlays[ i ] != null ) {

-        ImageData id = overlays[ i ].getImageData();

-        x -= id.width;

-        drawImage( id, x, getSize().y - id.height );

-      }

-    }

-  }

-

-  protected void drawCompositeImage( int width, int height ) {

-    ImageData bg = fBase.getImageData();

-    drawImage( bg, 0, 0 );

-    if( fOverlays != null ) {

-      if( fOverlays.length > 0 )

-        drawTopRight( fOverlays[ 0 ] );

-      if( fOverlays.length > 1 )

-        drawBottomRight( fOverlays[ 1 ] );

-      if( fOverlays.length > 2 )

-        drawBottomLeft( fOverlays[ 2 ] );

-      if( fOverlays.length > 3 )

-        drawTopLeft( fOverlays[ 3 ] );

-    }

-  }

-

-  protected void drawTopLeft( ImageDescriptor[] overlays ) {

-    if( overlays == null )

-      return;

-    int length = overlays.length;

-    int x = 0;

-    for( int i = 0; i < 3; i++ ) {

-      if( i < length && overlays[ i ] != null ) {

-        ImageData id = overlays[ i ].getImageData();

-        drawImage( id, x, 0 );

-        x += id.width;

-      }

-    }

-  }

-

-  protected void drawTopRight( ImageDescriptor[] overlays ) {

-    if( overlays == null )

-      return;

-    int length = overlays.length;

-    int x = getSize().x;

-    for( int i = 2; i >= 0; i-- ) {

-      if( i < length && overlays[ i ] != null ) {

-        ImageData id = overlays[ i ].getImageData();

-        x -= id.width;

-        drawImage( id, x, 0 );

-      }

-    }

-  }

-

-  protected Point getSize() {

-    return fSize;

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2000, 2008 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime;
+
+import org.eclipse.jface.resource.CompositeImageDescriptor;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.ImageData;
+import org.eclipse.swt.graphics.Point;
+
+
+public class OverlayIcon extends CompositeImageDescriptor {
+
+  static final int DEFAULT_WIDTH = 16;
+  static final int DEFAULT_HEIGHT = 16;
+  private Point fSize = null;
+  private ImageDescriptor fBase;
+  private ImageDescriptor fOverlays[][];
+
+  public OverlayIcon( ImageDescriptor base, ImageDescriptor[][] overlays ) {
+    fBase = base;
+    if( fBase == null )
+      fBase = ImageDescriptor.getMissingImageDescriptor();
+    fOverlays = overlays;
+    fSize = new Point( DEFAULT_WIDTH, DEFAULT_HEIGHT );
+  }
+
+  public OverlayIcon( ImageDescriptor base, ImageDescriptor[][] overlays, Point size ) {
+    fBase = base;
+    if( fBase == null )
+      fBase = ImageDescriptor.getMissingImageDescriptor();
+    fOverlays = overlays;
+    fSize = size;
+  }
+
+  protected void drawBottomLeft( ImageDescriptor[] overlays ) {
+    if( overlays == null )
+      return;
+    int length = overlays.length;
+    int x = 0;
+    for( int i = 0; i < 3; i++ ) {
+      if( i < length && overlays[ i ] != null ) {
+        ImageData id = overlays[ i ].getImageData();
+        drawImage( id, x, getSize().y - id.height );
+        x += id.width;
+      }
+    }
+  }
+
+  protected void drawBottomRight( ImageDescriptor[] overlays ) {
+    if( overlays == null )
+      return;
+    int length = overlays.length;
+    int x = getSize().x;
+    for( int i = 2; i >= 0; i-- ) {
+      if( i < length && overlays[ i ] != null ) {
+        ImageData id = overlays[ i ].getImageData();
+        x -= id.width;
+        drawImage( id, x, getSize().y - id.height );
+      }
+    }
+  }
+
+  @Override
+  protected void drawCompositeImage( int width, int height ) {
+    ImageData bg = fBase.getImageData();
+    drawImage( bg, 0, 0 );
+    if( fOverlays != null ) {
+      if( fOverlays.length > 0 )
+        drawTopRight( fOverlays[ 0 ] );
+      if( fOverlays.length > 1 )
+        drawBottomRight( fOverlays[ 1 ] );
+      if( fOverlays.length > 2 )
+        drawBottomLeft( fOverlays[ 2 ] );
+      if( fOverlays.length > 3 )
+        drawTopLeft( fOverlays[ 3 ] );
+    }
+  }
+
+  protected void drawTopLeft( ImageDescriptor[] overlays ) {
+    if( overlays == null )
+      return;
+    int length = overlays.length;
+    int x = 0;
+    for( int i = 0; i < 3; i++ ) {
+      if( i < length && overlays[ i ] != null ) {
+        ImageData id = overlays[ i ].getImageData();
+        drawImage( id, x, 0 );
+        x += id.width;
+      }
+    }
+  }
+
+  protected void drawTopRight( ImageDescriptor[] overlays ) {
+    if( overlays == null )
+      return;
+    int length = overlays.length;
+    int x = getSize().x;
+    for( int i = 2; i >= 0; i-- ) {
+      if( i < length && overlays[ i ] != null ) {
+        ImageData id = overlays[ i ].getImageData();
+        x -= id.width;
+        drawImage( id, x, 0 );
+      }
+    }
+  }
+
+  @Override
+  protected Point getSize() {
+    return fSize;
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
index 1632b13..fbc68f9 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/pderuntimeresources.properties
@@ -1,98 +1,98 @@
-###############################################################################

-# Copyright (c) 2000, 2010 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

-# http://www.eclipse.org/legal/epl-v10.html

-#

-# Contributors:

-#     IBM Corporation - initial API and implementation

-###############################################################################

-#

-# PDE Runtime resources

-#

-

-ActiveFormEditorSection_Active_Form_Page=Active Form Page

-ActiveMenuSection_0=The active contribution item identifier:

-ActiveMenuSection_1=The active action set identifier:

-ActiveMenuSection_2=The active contribution item class:

-ActiveMenuSection_3=The active handler:

-ActiveMenuSection_4=The active action definition identifier:

-ActiveMenuSection_5=The active contribution item class:

-ActiveMenuSection_6=The active contribution item class:

-ActiveMenuSection_7=The active contribution location URI:

-RegistryView_refresh_label=&Refresh

-RegistryView_refresh_tooltip=Refresh

-RegistryView_collapseAll_label = &Collapse All

-RegistryView_collapseAll_tooltip = Collapse All

-RegistryView_folders_imports = Prerequisites

-RegistryView_folders_libraries = Run-time Libraries

-RegistryView_folders_extensionPoints = Extension Points

-RegistryView_folders_extensions = Extensions

-RegistryView_found_problems=The following problems were found:

-RegistryView_showRunning_label = &Show Active Plug-ins Only

-RegistryView_showDisabled_label = Show &Disabled Plug-ins Only

-RegistryView_showAdvanced_label = Show Advanced &Operations

-RegistryBrowser_Bundle=&Plug-in

-RegistryBrowser_copy_label=&Copy

-RegistryBrowser_ExtensionPoint=&Extension Point

-RegistryBrowser_extensionPoints=extension points

-RegistryBrowser_GroupBy=&Group By

-RegistryBrowser_InitializingView=Initializing the Plug-in Registry view

-RegistryBrowser_plugins=plug-ins

-RegistryBrowser_Service=&Service

-RegistryBrowser_Services=services

-RegistryBrowserLabelProvider_contributedBy=contributed by: {0}

-RegistryBrowserLabelProvider_ExportedPackages=Exported Packages

-RegistryBrowserLabelProvider_Fragments=Fragments

-RegistryBrowserLabelProvider_ImportedPackages=Imported Packages

-RegistryBrowserLabelProvider_Properties=Properties

-RegistryBrowserLabelProvider_RegisteredBy=Registered by 

-RegistryBrowserLabelProvider_usedServices=Used Services

-RegistryBrowserLabelProvider_registeredServices=Registered Services

-RegistryBrowserLabelProvider_UsingBundles=Using bundles

-RegistryView_titleSummary = Filter matched {0} of {1} {2}.

-RegistryView_startAction_label = Start

-RegistryView_stopAction_label = Stop

-RegistryView_enableAction_label = Enable

-RegistryView_diag_dialog_title=Diagnosis

-RegistryView_diagnoseAction_label=Diagnose

-RegistryView_disableAction_label = Disable

-RegistryView_no_unresolved_constraints=No problems detected.

-

-MessageHelper_missing_optional_required_bundle=Missing optionally required bundle {0}

-MessageHelper_missing_required_bundle=Missing required bundle {0}

-MessageHelper_missing_imported_package=Missing imported package {0}

-MessageHelper_missing_host=Missing host {0}

-

-# Plug-in Spy

-SpyDialog_title = Plug-in Selection Spy

-MenuSpyDialog_title = Plug-in Menu Spy

-SpyDialog_close = &Close

-SpyDialog_activeShell_title = Active Shell

-SpyDialog_activeShell_desc = The active shell class:

-SpyDialog_activeWizard_title = Active Wizard ({0})

-SpyDialog_activeWizard_desc = The active wizard class:

-SpyDialog_activePart_title = Active Part ({0})

-SpyDialog_activePart_desc = The active {0} class:

-SpyDialog_activeMenuIds = The active menu contribution identifiers:

-SpyDialog_contributingPluginId_title = The contributing plug-in:

-SpyDialog_contributingPluginId_desc = The active {0} identifier:

-SpyDialog_activeSelection_title = Active Selection

-SpyDialog_activeSelection_desc = The selection class:

-SpyDialog_activeSelectionInterfaces_desc = The interfaces valid for the selection:

-SpyDialog_activeSelectedElement_desc = The type of the selected element:

-SpyDialog_activeSelectedElementInterfaces_desc = The interfaces valid for the selected element:

-SpyDialog_activeSelectedElementsCount_desc = {0} elements selected

-SpyDialog_activeDialogPageSection_title = Active Page ({0})

-SpyDialog_activeDialogPageSection_title2 = Active Page

-SpyDialog_activeDialogPageSection_desc = The active page class:

-SpyDialog_activeHelpSection_title = Active Help

-SpyDialog_activeHelpSection_desc = The active help context identifiers:

-SpyIDEUtil_noSourceFound_title = Source Lookup Error

-SpyIDEUtil_noSourceFound_message = Unable to find source for class ''{0}''

-

-SpyDialog_activePageBook_title=The active page:

-

-SpyFormToolkit_saveImageAs_title = Save Image As...

+###############################################################################
+# Copyright (c) 2000, 2010 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
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+#
+# PDE Runtime resources
+#
+
+ActiveFormEditorSection_Active_Form_Page=Active Form Page
+ActiveMenuSection_0=The active contribution item identifier:
+ActiveMenuSection_1=The active action set identifier:
+ActiveMenuSection_2=The active contribution item class:
+ActiveMenuSection_3=The active handler:
+ActiveMenuSection_4=The active action definition identifier:
+ActiveMenuSection_5=The active contribution item class:
+ActiveMenuSection_6=The active contribution item class:
+ActiveMenuSection_7=The active contribution location URI:
+RegistryView_refresh_label=&Refresh
+RegistryView_refresh_tooltip=Refresh
+RegistryView_collapseAll_label = &Collapse All
+RegistryView_collapseAll_tooltip = Collapse All
+RegistryView_folders_imports = Prerequisites
+RegistryView_folders_libraries = Run-time Libraries
+RegistryView_folders_extensionPoints = Extension Points
+RegistryView_folders_extensions = Extensions
+RegistryView_found_problems=The following problems were found:
+RegistryView_showRunning_label = &Show Active Plug-ins Only
+RegistryView_showDisabled_label = Show &Disabled Plug-ins Only
+RegistryView_showAdvanced_label = Show Advanced &Operations
+RegistryBrowser_Bundle=&Plug-in
+RegistryBrowser_copy_label=&Copy
+RegistryBrowser_ExtensionPoint=&Extension Point
+RegistryBrowser_extensionPoints=extension points
+RegistryBrowser_GroupBy=&Group By
+RegistryBrowser_InitializingView=Initializing the Plug-in Registry view
+RegistryBrowser_plugins=plug-ins
+RegistryBrowser_Service=&Service
+RegistryBrowser_Services=services
+RegistryBrowserLabelProvider_contributedBy=contributed by: {0}
+RegistryBrowserLabelProvider_ExportedPackages=Exported Packages
+RegistryBrowserLabelProvider_Fragments=Fragments
+RegistryBrowserLabelProvider_ImportedPackages=Imported Packages
+RegistryBrowserLabelProvider_Properties=Properties
+RegistryBrowserLabelProvider_RegisteredBy=Registered by 
+RegistryBrowserLabelProvider_usedServices=Used Services
+RegistryBrowserLabelProvider_registeredServices=Registered Services
+RegistryBrowserLabelProvider_UsingBundles=Using bundles
+RegistryView_titleSummary = Filter matched {0} of {1} {2}.
+RegistryView_startAction_label = Start
+RegistryView_stopAction_label = Stop
+RegistryView_enableAction_label = Enable
+RegistryView_diag_dialog_title=Diagnosis
+RegistryView_diagnoseAction_label=Diagnose
+RegistryView_disableAction_label = Disable
+RegistryView_no_unresolved_constraints=No problems detected.
+
+MessageHelper_missing_optional_required_bundle=Missing optionally required bundle {0}
+MessageHelper_missing_required_bundle=Missing required bundle {0}
+MessageHelper_missing_imported_package=Missing imported package {0}
+MessageHelper_missing_host=Missing host {0}
+
+# Plug-in Spy
+SpyDialog_title = Plug-in Selection Spy
+MenuSpyDialog_title = Plug-in Menu Spy
+SpyDialog_close = &Close
+SpyDialog_activeShell_title = Active Shell
+SpyDialog_activeShell_desc = The active shell class:
+SpyDialog_activeWizard_title = Active Wizard ({0})
+SpyDialog_activeWizard_desc = The active wizard class:
+SpyDialog_activePart_title = Active Part ({0})
+SpyDialog_activePart_desc = The active {0} class:
+SpyDialog_activeMenuIds = The active menu contribution identifiers:
+SpyDialog_contributingPluginId_title = The contributing plug-in:
+SpyDialog_contributingPluginId_desc = The active {0} identifier:
+SpyDialog_activeSelection_title = Active Selection
+SpyDialog_activeSelection_desc = The selection class:
+SpyDialog_activeSelectionInterfaces_desc = The interfaces valid for the selection:
+SpyDialog_activeSelectedElement_desc = The type of the selected element:
+SpyDialog_activeSelectedElementInterfaces_desc = The interfaces valid for the selected element:
+SpyDialog_activeSelectedElementsCount_desc = {0} elements selected
+SpyDialog_activeDialogPageSection_title = Active Page ({0})
+SpyDialog_activeDialogPageSection_title2 = Active Page
+SpyDialog_activeDialogPageSection_desc = The active page class:
+SpyDialog_activeHelpSection_title = Active Help
+SpyDialog_activeHelpSection_desc = The active help context identifiers:
+SpyIDEUtil_noSourceFound_title = Source Lookup Error
+SpyIDEUtil_noSourceFound_message = Unable to find source for class ''{0}''
+
+SpyDialog_activePageBook_title=The active page:
+
+SpyFormToolkit_saveImageAs_title = Save Image As...
 SpyFormToolkit_copyQualifiedName = Copy Qualified Name
\ No newline at end of file
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/DiagnosticsDialog.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/DiagnosticsDialog.java
index 3922598..cbb6fce 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/DiagnosticsDialog.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/DiagnosticsDialog.java
@@ -1,45 +1,43 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     IBM Corporation - initial API and implementation

- *     Benjamin Muskalla <b.muskalla@gmx.net> - bug 207831

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry;

-

-import org.eclipse.core.runtime.IStatus;

-import org.eclipse.jface.dialogs.ErrorDialog;

-import org.eclipse.jface.dialogs.IDialogConstants;

-import org.eclipse.swt.widgets.*;

-

-

-public class DiagnosticsDialog extends ErrorDialog {

-

-  public DiagnosticsDialog( Shell parentShell,

-                            String dialogTitle,

-                            String message,

-                            IStatus status,

-                            int displayMask )

-  {

-    super( parentShell, dialogTitle, message, status, displayMask );

-  }

-

-  protected Control createDialogArea( Composite parent ) {

-    Control area = super.createDialogArea( parent );

-    createDropDownList( ( Composite )area );

-    return area;

-  }

-

-  /*

-   * (non-Javadoc)

-   * @see org.eclipse.jface.dialogs.Dialog#createButtonsForButtonBar(org.eclipse

-   * .swt.widgets.Composite)

-   */

-  protected void createButtonsForButtonBar( Composite parent ) {

-    createButton( parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true );

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2007, 2008 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Benjamin Muskalla <b.muskalla@gmx.net> - bug 207831
+ *     Arnaud Mergey <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.jface.dialogs.ErrorDialog;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.swt.widgets.*;
+
+
+public class DiagnosticsDialog extends ErrorDialog {
+
+  public DiagnosticsDialog( Shell parentShell,
+                            String dialogTitle,
+                            String message,
+                            IStatus status,
+                            int displayMask )
+  {
+    super( parentShell, dialogTitle, message, status, displayMask );
+  }
+
+  @Override
+  protected Control createDialogArea( Composite parent ) {
+    Control area = super.createDialogArea( parent );
+    createDropDownList( ( Composite )area );
+    return area;
+  }
+
+  @Override
+  protected void createButtonsForButtonBar( Composite parent ) {
+    createButton( parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true );
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
index db422e0..a67408a 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowser.java
@@ -1,728 +1,796 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 211127

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry;

-

-import java.util.*;

-import java.util.List;

-import org.eclipse.core.runtime.*;

-import org.eclipse.core.runtime.jobs.Job;

-import org.eclipse.jface.action.*;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.dialogs.MessageDialog;

-import org.eclipse.jface.viewers.*;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.*;

-import org.eclipse.pde.internal.runtime.registry.model.*;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.custom.BusyIndicator;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.*;

-import org.eclipse.ui.*;

-import org.eclipse.ui.dialogs.FilteredTree;

-import org.eclipse.ui.dialogs.PatternFilter;

-import org.eclipse.ui.part.DrillDownAdapter;

-import org.eclipse.ui.part.ViewPart;

-import org.osgi.framework.BundleException;

-

-

-public class RegistryBrowser extends ViewPart {

-

-  private class GroupByAction extends Action {

-

-    private int actionGroupBy;

-

-    public GroupByAction( String name, int groupBy ) {

-      super( name, AS_RADIO_BUTTON );

-      this.actionGroupBy = groupBy;

-    }

-

-    public void run() {

-      if( isChecked() ) {

-        fMemento.putInteger( GROUP_BY, actionGroupBy );

-        // refreshAction takes into account checked state of

-        // fShowExtensionsOnlyAction

-        // (via updateItems(true)

-        fRefreshAction.run();

-      }

-    }

-  }

-

-  public static final String SHOW_RUNNING_PLUGINS = "RegistryView.showRunning.label"; //$NON-NLS-1$

-  public static final String SHOW_ADVANCED_MODE = "RegistryView.showAdvancedMode.label"; //$NON-NLS-1$

-  public static final String GROUP_BY = "RegistryView.groupBy"; //$NON-NLS-1$ 

-  public static final String SHOW_DISABLED_MODE = "RegistryView.showDisabledMode.label"; //$NON-NLS-1$

-  public static final int BUNDLES = 0;

-  public static final int EXTENSION_REGISTRY = 1;

-  public static final int SERVICES = 2;

-  private FilteredTree fFilteredTree;

-  private TreeViewer fTreeViewer;

-  private IMemento fMemento;

-  private RegistryModel model;

-  private ModelChangeListener listener;

-  private Job initializeModelJob;

-  private RegistryBrowserContentProvider fContentProvider;

-  private RegistryBrowserLabelProvider fLabelProvider;

-  private static final int REFRESH_DELAY = 50;

-  private long lastRefresh = 0;

-  private Thread refreshThread;

-  // menus and action items

-  private Action fRefreshAction;

-  private Action fShowPluginsAction;

-  private Action fCollapseAllAction;

-  private Action fShowAdvancedOperationsAction;

-  private Action fGroupByBundlesAction;

-  private Action fGroupByExtensionPointsAction;

-  private Action fGroupByServicesAction;

-  private Action fShowDisabledAction;

-  // private Action fCopyAction;

-  // advanced actions

-  private Action fStartAction;

-  private Action fStopAction;

-  private Action fEnableAction;

-  private Action fDisableAction;

-  private Action fDiagnoseAction;

-  // private Clipboard fClipboard;

-  private DrillDownAdapter fDrillDownAdapter;

-  private ViewerFilter fActiveFilter = new ViewerFilter() {

-

-    public boolean select( Viewer viewer, Object parentElement, Object element ) {

-      if( element instanceof ExtensionPoint )

-        element = Platform.getBundle( ( ( ExtensionPoint )element ).getNamespaceIdentifier() );

-      else if( element instanceof Extension )

-        element = Platform.getBundle( ( ( Extension )element ).getNamespaceIdentifier() );

-      if( element instanceof Bundle )

-        return ( ( Bundle )element ).getState() == Bundle.ACTIVE;

-      return true;

-    }

-  };

-  private ViewerFilter fDisabledFilter = new ViewerFilter() {

-

-    public boolean select( Viewer viewer, Object parentElement, Object element ) {

-      if( element instanceof Bundle ) {

-        return !( ( Bundle )element ).isEnabled();

-      }

-      return false;

-    }

-  };

-

-  /*

-   * customized DrillDownAdapter which modifies enabled state of showing active/inactive plug-ins

-   * action - see Bug 58467

-   */

-  class RegistryDrillDownAdapter extends DrillDownAdapter {

-

-    public RegistryDrillDownAdapter( TreeViewer tree ) {

-      super( tree );

-    }

-

-    public void goInto() {

-      super.goInto();

-      fShowPluginsAction.setEnabled( !canGoHome() );

-      fShowDisabledAction.setEnabled( !canGoHome() );

-    }

-

-    public void goBack() {

-      super.goBack();

-      fShowPluginsAction.setEnabled( !canGoHome() );

-      fShowDisabledAction.setEnabled( !canGoHome() );

-    }

-

-    public void goHome() {

-      super.goHome();

-      fShowPluginsAction.setEnabled( !canGoHome() );

-      fShowDisabledAction.setEnabled( !canGoHome() );

-    }

-

-    public void goInto( Object newInput ) {

-      super.goInto( newInput );

-      fShowPluginsAction.setEnabled( !canGoHome() );

-      fShowDisabledAction.setEnabled( !canGoHome() );

-    }

-  }

-

-  private void initializeModel() {

-    model = RegistryModelFactory.getRegistryModel( "local" ); //$NON-NLS-1$

-    fTreeViewer.setInput( model );

-    listener = new RegistryBrowserModelChangeListener( RegistryBrowser.this, Display.getCurrent() );

-    model.addModelChangeListener( listener );

-    initializeModelJob = new Job( PDERuntimeMessages.get().RegistryBrowser_InitializingView ) {

-

-      public IStatus run( IProgressMonitor monitor ) {

-        model.connect( monitor, true );

-        initializeModelJob = null;

-        return monitor.isCanceled()

-                                   ? Status.CANCEL_STATUS

-                                   : Status.OK_STATUS;

-      }

-    };

-    initializeModelJob.schedule();

-  }

-

-  public void init( IViewSite site, IMemento memento ) throws PartInitException {

-    super.init( site, memento );

-    if( memento == null )

-      this.fMemento = XMLMemento.createWriteRoot( "REGISTRYVIEW" ); //$NON-NLS-1$

-    else

-      this.fMemento = memento;

-    initializeMemento();

-  }

-

-  private void initializeMemento() {

-    // show all bundles by default (i.e. not just activated ones)

-    if( fMemento.getString( SHOW_RUNNING_PLUGINS ) == null )

-      fMemento.putString( SHOW_RUNNING_PLUGINS, "false" ); //$NON-NLS-1$

-    if( fMemento.getInteger( GROUP_BY ) == null )

-      fMemento.putInteger( GROUP_BY, BUNDLES );

-    if( fMemento.getString( SHOW_DISABLED_MODE ) == null )

-      fMemento.putString( SHOW_DISABLED_MODE, "false" ); //$NON-NLS-1$

-    // default to not showing advanced options to users

-    if( fMemento.getString( SHOW_ADVANCED_MODE ) == null )

-      fMemento.putString( SHOW_ADVANCED_MODE, "false" ); //$NON-NLS-1$

-  }

-

-  public void dispose() {

-    if( initializeModelJob != null ) {

-      initializeModelJob.cancel();

-    }

-    model.disconnect();

-    model.removeModelChangeListener( listener );

-    // if (fClipboard != null) {

-    // fClipboard.dispose();

-    // }

-    super.dispose();

-  }

-

-  public void createPartControl( Composite parent ) {

-    // create the sash form that will contain the tree viewer & text viewer

-    Composite composite = new Composite( parent, SWT.NONE );

-    GridLayout layout = new GridLayout();

-    layout.marginHeight = layout.marginWidth = 0;

-    composite.setLayout( layout );

-    // composite.setLayoutData(new GridData(GridData.FILL_BOTH));

-    makeActions();

-    createTreeViewer( composite );

-    // fClipboard = new Clipboard(fTreeViewer.getTree().getDisplay());

-    fillToolBar();

-  }

-

-  private void createTreeViewer( Composite parent ) {

-    Composite composite = new Composite( parent, SWT.NONE );

-    GridLayout layout = new GridLayout();

-    layout.marginHeight = layout.marginWidth = 0;

-    composite.setLayout( layout );

-    composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );

-    fFilteredTree = new RegistryFilteredTree( this, composite, SWT.MULTI, new PatternFilter() );

-    fFilteredTree.setBackground( parent.getDisplay().getSystemColor( SWT.COLOR_LIST_BACKGROUND ) );

-    Tree tree = fFilteredTree.getViewer().getTree();

-    GridData gd = new GridData( GridData.FILL_BOTH );

-    fFilteredTree.setLayoutData( gd );

-    fTreeViewer = fFilteredTree.getViewer();

-    fContentProvider = new RegistryBrowserContentProvider( this );

-    fTreeViewer.setContentProvider( fContentProvider );

-    fLabelProvider = new RegistryBrowserLabelProvider( this );

-    fTreeViewer.setLabelProvider( fLabelProvider );

-    fTreeViewer.setUseHashlookup( true );

-    fTreeViewer.setComparator( new ViewerComparator() {

-

-      public int compare( Viewer viewer, Object e1, Object e2 ) {

-        // let Comparables compare themselves

-        if( e1 instanceof Comparable

-            && e2 instanceof Comparable

-            && e1.getClass().equals( e2.getClass() ) )

-        {

-          Comparable c1 = ( Comparable )e1;

-          Comparable c2 = ( Comparable )e2;

-          return c1.compareTo( c2 );

-        }

-        if( e1 instanceof Folder && e2 instanceof Folder )

-          return ( ( Folder )e1 ).getId() - ( ( Folder )e2 ).getId();

-        if( e1 instanceof Bundle && e2 instanceof Bundle ) {

-          e1 = ( ( Bundle )e1 ).getSymbolicName();

-          e2 = ( ( Bundle )e2 ).getSymbolicName();

-        }

-        return super.compare( viewer, e1, e2 );

-      }

-    } );

-    if( fShowPluginsAction.isChecked() )

-      fTreeViewer.addFilter( fActiveFilter );

-    if( fShowDisabledAction.isChecked() )

-      fTreeViewer.addFilter( fDisabledFilter );

-    initializeModel();

-    PlatformUI.getWorkbench()

-      .getHelpSystem()

-      .setHelp( fTreeViewer.getControl(), IHelpContextIds.REGISTRY_VIEW );

-    getViewSite().setSelectionProvider( fTreeViewer );

-    MenuManager popupMenuManager = new MenuManager();

-    IMenuListener listener = new IMenuListener() {

-

-      public void menuAboutToShow( IMenuManager mng ) {

-        fillContextMenu( mng );

-      }

-    };

-    popupMenuManager.setRemoveAllWhenShown( true );

-    popupMenuManager.addMenuListener( listener );

-    Menu menu = popupMenuManager.createContextMenu( tree );

-    tree.setMenu( menu );

-  }

-

-  private void fillToolBar() {

-    fDrillDownAdapter = new RegistryDrillDownAdapter( fTreeViewer );

-    IActionBars bars = getViewSite().getActionBars();

-    // bars.setGlobalActionHandler(ActionFactory.COPY.getId(), fCopyAction);

-    IToolBarManager mng = bars.getToolBarManager();

-    fDrillDownAdapter.addNavigationActions( mng );

-    mng.add( fRefreshAction );

-    mng.add( new Separator() );

-    mng.add( fCollapseAllAction );

-    IMenuManager mgr = bars.getMenuManager();

-    IMenuManager manager = new MenuManager( PDERuntimeMessages.get().RegistryBrowser_GroupBy );

-    manager.add( fGroupByBundlesAction );

-    manager.add( fGroupByExtensionPointsAction );

-    manager.add( fGroupByServicesAction );

-    mgr.add( manager );

-    mgr.add( new Separator() );

-    mgr.add( fShowPluginsAction );

-    mgr.add( fShowDisabledAction );

-    mgr.add( new Separator() );

-    mgr.add( fShowAdvancedOperationsAction );

-  }

-

-  private void fillContextMenu( IMenuManager manager ) {

-    manager.add( fRefreshAction );

-    manager.add( new Separator() );

-    // manager.add(fCopyAction);

-    // manager.add(new Separator());

-    fDrillDownAdapter.addNavigationActions( manager );

-    manager.add( new Separator() );

-    // check if we should enable advanced actions

-    if( fShowAdvancedOperationsAction.isChecked() && isBundleSelected() ) {

-      // control bundle state actions

-      if( selectedBundlesStopped() )

-        manager.add( fStartAction );

-      if( selectedBundlesStarted() )

-        manager.add( fStopAction );

-      if( getSelectedBundles().size() == 1 )

-        manager.add( fDiagnoseAction );

-      // security related actions

-      if( selectedBundlesDisabled() )

-        manager.add( fEnableAction );

-      if( selectedBundlesEnabled() )

-        manager.add( fDisableAction );

-    }

-    manager.add( new Separator() );

-    manager.add( fShowPluginsAction );

-    manager.add( fShowDisabledAction );

-    manager.add( new Separator() );

-    manager.add( fShowAdvancedOperationsAction );

-  }

-

-  public void saveState( IMemento memento ) {

-    if( memento == null || fMemento == null || fTreeViewer == null )

-      return;

-    fMemento.putString( SHOW_RUNNING_PLUGINS, Boolean.toString( fShowPluginsAction.isChecked() ) );

-    fMemento.putString( SHOW_DISABLED_MODE, Boolean.toString( fShowDisabledAction.isChecked() ) );

-    fMemento.putBoolean( SHOW_ADVANCED_MODE, fShowAdvancedOperationsAction.isChecked() );

-    memento.putMemento( fMemento );

-  }

-

-  public void setFocus() {

-    Text filterText = fFilteredTree.getFilterControl();

-    if( filterText != null ) {

-      filterText.setFocus();

-    }

-  }

-

-  /*

-   * toolbar and context menu actions

-   */

-  private void makeActions() {

-    fRefreshAction = new Action( "refresh" ) { //$NON-NLS-1$

-

-      public void run() {

-        BusyIndicator.showWhile( fTreeViewer.getTree().getDisplay(), new Runnable() {

-

-          public void run() {

-            refresh( fTreeViewer.getInput() );

-          }

-        } );

-      }

-    };

-    fRefreshAction.setText( PDERuntimeMessages.get().RegistryView_refresh_label );

-    fRefreshAction.setToolTipText( PDERuntimeMessages.get().RegistryView_refresh_tooltip );

-    fRefreshAction.setImageDescriptor( PDERuntimePluginImages.DESC_REFRESH );

-    fRefreshAction.setDisabledImageDescriptor( PDERuntimePluginImages.DESC_REFRESH_DISABLED );

-    fShowPluginsAction = new Action( PDERuntimeMessages.get().RegistryView_showRunning_label ) {

-

-      public void run() {

-        if( fShowPluginsAction.isChecked() ) {

-          fTreeViewer.addFilter( fActiveFilter );

-        } else {

-          fTreeViewer.removeFilter( fActiveFilter );

-        }

-        updateTitle();

-      }

-    };

-    fShowPluginsAction.setChecked( fMemento.getString( SHOW_RUNNING_PLUGINS ).equals( "true" ) ); //$NON-NLS-1$

-    fShowDisabledAction = new Action( PDERuntimeMessages.get().RegistryView_showDisabled_label ) {

-

-      public void run() {

-        if( fShowDisabledAction.isChecked() ) {

-          fTreeViewer.addFilter( fDisabledFilter );

-        } else {

-          fTreeViewer.removeFilter( fDisabledFilter );

-        }

-        updateTitle();

-      }

-    };

-    fShowDisabledAction.setChecked( fMemento.getString( SHOW_DISABLED_MODE ).equals( "true" ) ); //$NON-NLS-1$

-    // fCopyAction = new Action(

-    // PDERuntimeMessages.get().RegistryBrowser_copy_label) {

-    // public void run() {

-    // ITreeSelection selection = (ITreeSelection) fFilteredTree

-    // .getViewer().getSelection();

-    // if (selection.isEmpty()) {

-    // return;

-    // }

-    //

-    // String textVersion = ((ILabelProvider) fTreeViewer

-    // .getLabelProvider()).getText(selection

-    // .getFirstElement());

-    // if ((textVersion != null) && (textVersion.trim().length() > 0)) {

-    // // set the clipboard contents

-    // fClipboard.setContents(new Object[] { textVersion },

-    // new Transfer[] { TextTransfer.getInstance() });

-    // }

-    // }

-    // };

-    // fCopyAction.setImageDescriptor(PDERuntimePluginImages.COPY_QNAME);

-    fGroupByBundlesAction = new GroupByAction( PDERuntimeMessages.get().RegistryBrowser_Bundle,

-                                               BUNDLES );

-    int groupBy = getGroupBy();

-    fGroupByBundlesAction.setChecked( groupBy == BUNDLES );

-    fGroupByExtensionPointsAction = new GroupByAction( PDERuntimeMessages.get().RegistryBrowser_ExtensionPoint,

-                                                       EXTENSION_REGISTRY );

-    fGroupByExtensionPointsAction.setChecked( groupBy == EXTENSION_REGISTRY );

-    fGroupByServicesAction = new GroupByAction( PDERuntimeMessages.get().RegistryBrowser_Service,

-                                                SERVICES );

-    fGroupByServicesAction.setChecked( groupBy == SERVICES );

-    fShowAdvancedOperationsAction = new Action( PDERuntimeMessages.get().RegistryView_showAdvanced_label )

-    {

-

-      public void run() { // do nothing

-      }

-    };

-    fShowAdvancedOperationsAction.setChecked( fMemento.getString( SHOW_ADVANCED_MODE )

-      .equals( "true" ) ); //$NON-NLS-1$

-    fStartAction = new Action( PDERuntimeMessages.get().RegistryView_startAction_label ) {

-

-      public void run() {

-        try {

-          List bundles = getSelectedBundles();

-          for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-            Bundle bundle = ( Bundle )it.next();

-            bundle.start();

-          }

-        } catch( BundleException e ) {

-          PDERuntimePlugin.log( e );

-        }

-      }

-    };

-    fStopAction = new Action( PDERuntimeMessages.get().RegistryView_stopAction_label ) {

-

-      public void run() {

-        try {

-          List bundles = getSelectedBundles();

-          for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-            Bundle bundle = ( Bundle )it.next();

-            bundle.stop();

-          }

-        } catch( BundleException e ) {

-          PDERuntimePlugin.log( e );

-        }

-      }

-    };

-    fEnableAction = new Action( PDERuntimeMessages.get().RegistryView_enableAction_label ) {

-

-      public void run() {

-        List bundles = getSelectedBundles();

-        for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-          Bundle bundle = ( Bundle )it.next();

-          bundle.enable();

-        }

-      }

-    };

-    fDisableAction = new Action( PDERuntimeMessages.get().RegistryView_disableAction_label ) {

-

-      public void run() {

-        List bundles = getSelectedBundles();

-        for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-          Bundle bundle = ( Bundle )it.next();

-          bundle.disable();

-        }

-      }

-    };

-    fDiagnoseAction = new Action( PDERuntimeMessages.get().RegistryView_diagnoseAction_label ) {

-

-      public void run() {

-        List bundles = getSelectedBundles();

-        for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-          Bundle bundle = ( Bundle )it.next();

-          MultiStatus problems = bundle.diagnose();

-          Dialog dialog;

-          if( ( problems != null ) && ( problems.getChildren().length > 0 ) ) {

-            dialog = new DiagnosticsDialog( getSite().getShell(),

-                                            PDERuntimeMessages.get().RegistryView_diag_dialog_title,

-                                            null,

-                                            problems,

-                                            IStatus.WARNING );

-            dialog.open();

-          } else {

-            MessageDialog.openInformation( getSite().getShell(),

-                                           PDERuntimeMessages.get().RegistryView_diag_dialog_title,

-                                           PDERuntimeMessages.get().RegistryView_no_unresolved_constraints );

-          }

-        }

-      }

-    };

-    fCollapseAllAction = new Action( "collapseAll" ) { //$NON-NLS-1$

-

-      public void run() {

-        fTreeViewer.collapseAll();

-      }

-    };

-    fCollapseAllAction.setText( PDERuntimeMessages.get().RegistryView_collapseAll_label );

-    fCollapseAllAction.setImageDescriptor( PDERuntimePluginImages.DESC_COLLAPSE_ALL );

-    fCollapseAllAction.setToolTipText( PDERuntimeMessages.get().RegistryView_collapseAll_tooltip );

-  }

-

-  public int getGroupBy() {

-    return fMemento.getInteger( GROUP_BY ).intValue();

-  }

-

-  public void updateTitle() {

-    setContentDescription( getTitleSummary() );

-  }

-

-  protected Tree getUndisposedTree() {

-    if( fTreeViewer == null || fTreeViewer.getTree() == null || fTreeViewer.getTree().isDisposed() )

-      return null;

-    return fTreeViewer.getTree();

-  }

-

-  public String getTitleSummary() {

-    Tree tree = getUndisposedTree();

-    String type;

-    int total = 0;

-    switch( getGroupBy() ) {

-      default:

-      case BUNDLES:

-        type = PDERuntimeMessages.get().RegistryBrowser_plugins;

-        total = model.getBundles().length;

-      break;

-      case EXTENSION_REGISTRY:

-        type = PDERuntimeMessages.get().RegistryBrowser_extensionPoints;

-        total = model.getExtensionPoints().length;

-      break;

-      case SERVICES:

-        type = PDERuntimeMessages.get().RegistryBrowser_Services;

-        total = model.getServiceNames().length;

-      break;

-    }

-    if( tree == null )

-      return NLS.bind( PDERuntimeMessages.get().RegistryView_titleSummary, ( new String[] {

-        "0", "0", type} ) ); //$NON-NLS-1$ //$NON-NLS-2$

-    return NLS.bind( PDERuntimeMessages.get().RegistryView_titleSummary, ( new String[] {

-      Integer.toString( tree.getItemCount() ), Integer.toString( total ), type

-    } ) );

-  }

-

-  private boolean isBundleSelected() {

-    IStructuredSelection selection = ( IStructuredSelection )fTreeViewer.getSelection();

-    if( selection != null ) {

-      Object[] elements = selection.toArray();

-      for( int i = 0; i < elements.length; i++ ) {

-        if( !( elements[ i ] instanceof Bundle ) ) {

-          return false;

-        }

-      }

-    }

-    return true;

-  }

-

-  private List getSelectedBundles() {

-    List bundles = new ArrayList();

-    IStructuredSelection selection = ( IStructuredSelection )fTreeViewer.getSelection();

-    if( selection != null ) {

-      Object[] elements = selection.toArray();

-      for( int i = 0; i < elements.length; i++ ) {

-        if( elements[ i ] instanceof Bundle ) {

-          bundles.add( elements[ i ] );

-        }

-      }

-    }

-    return bundles;

-  }

-

-  /**

-   * @return true if none is stopped, false if at least one is stopped

-   */

-  private boolean selectedBundlesStarted() {

-    List bundles = getSelectedBundles();

-    for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-      Bundle bundle = ( Bundle )it.next();

-      if( bundle.getState() != Bundle.ACTIVE )

-        return false;

-    }

-    return true;

-  }

-

-  /**

-   * @return true if none is active, false if at least one is active

-   */

-  private boolean selectedBundlesStopped() {

-    List bundles = getSelectedBundles();

-    for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-      Bundle bundle = ( Bundle )it.next();

-      if( bundle.getState() == Bundle.ACTIVE )

-        return false;

-    }

-    return true;

-  }

-

-  /**

-   * @return true if none is enabled, false if at least one is enabled

-   */

-  private boolean selectedBundlesDisabled() {

-    List bundles = getSelectedBundles();

-    for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-      Bundle bundle = ( Bundle )it.next();

-      if( bundle.isEnabled() )

-        return false;

-    }

-    return true;

-  }

-

-  /**

-   * @return true if none is disabled, false if at least one is disabled

-   */

-  private boolean selectedBundlesEnabled() {

-    List bundles = getSelectedBundles();

-    for( Iterator it = bundles.iterator(); it.hasNext(); ) {

-      Bundle bundle = ( Bundle )it.next();

-      if( !bundle.isEnabled() )

-        return false;

-    }

-    return true;

-  }

-

-  public void add( Object object ) {

-    Object parent = fContentProvider.getParent( object );

-    if( parent == null ) {

-      add( fTreeViewer.getInput(), object );

-    } else {

-      refresh( parent );

-    }

-  }

-

-  protected void add( Object parent, Object object ) {

-    if( fTreeViewer.getTree().isDisposed() )

-      return;

-    if( fDrillDownAdapter.canGoHome() )

-      return;

-    fTreeViewer.add( parent, object );

-    updateTitle();

-  }

-

-  public void remove( Object object ) {

-    if( fTreeViewer.getTree().isDisposed() )

-      return;

-    if( fDrillDownAdapter.canGoHome() )

-      return;

-    fTreeViewer.remove( object );

-    updateTitle();

-  }

-

-  private boolean filtersEnabled() {

-    return fTreeViewer.getFilters().length > 0;

-  }

-

-  private void deferredRefresh() {

-    if( refreshThread != null )

-      return;

-    long now = System.currentTimeMillis();

-    if( now - lastRefresh > REFRESH_DELAY ) {

-      fTreeViewer.refresh();

-      updateTitle();

-      lastRefresh = now;

-    } else {

-      Runnable runnable = new Runnable() {

-

-        public void run() {

-          try {

-            Thread.sleep( REFRESH_DELAY );

-          } catch( InterruptedException e ) {

-            return;

-          }

-          refreshThread = null;

-          if( fTreeViewer.getTree().isDisposed() )

-            return;

-          fTreeViewer.getTree().getDisplay().asyncExec( new Runnable() {

-

-            public void run() {

-              if( !fTreeViewer.getTree().isDisposed() ) {

-                fTreeViewer.refresh();

-                updateTitle();

-              }

-            }

-          } );

-        }

-      };

-      refreshThread = new Thread( runnable );

-      refreshThread.start();

-    }

-  }

-

-  void refresh( Object[] objects ) {

-    if( fTreeViewer.getTree().isDisposed() )

-      return;

-    if( filtersEnabled() ) {

-      deferredRefresh();

-    } else {

-      for( int i = 0; i < objects.length; i++ ) {

-        fTreeViewer.refresh( objects[ i ] );

-      }

-    }

-    updateTitle();

-  }

-

-  void refresh( Object object ) {

-    if( fTreeViewer.getTree().isDisposed() )

-      return;

-    if( filtersEnabled() ) {

-      deferredRefresh();

-    } else {

-      fTreeViewer.refresh( object );

-      updateTitle();

-    }

-  }

-

-  public Object getAdapter( Class clazz ) {

-    if( ILabelProvider.class.equals( clazz ) ) {

-      return fLabelProvider;

-    }

-    if( IContentProvider.class.equals( clazz ) ) {

-      return fContentProvider;

-    }

-    return super.getAdapter( clazz );

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2015 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 211127
+ *     Arnaud Mergey <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.jface.action.*;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.*;
+import org.eclipse.pde.internal.runtime.registry.model.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.actions.ActionFactory;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.part.DrillDownAdapter;
+import org.eclipse.ui.part.ViewPart;
+import org.osgi.framework.BundleException;
+
+
+public class RegistryBrowser extends ViewPart {
+
+  private class GroupByAction extends Action {
+
+    private int actionGroupBy;
+
+    public GroupByAction( String name, int groupBy ) {
+      super( name, AS_RADIO_BUTTON );
+      this.actionGroupBy = groupBy;
+    }
+
+    @Override
+    public void run() {
+      if( isChecked() ) {
+        fMemento.putInteger( GROUP_BY, actionGroupBy );
+        // refreshAction takes into account checked state of fShowExtensionsOnlyAction
+        // (via updateItems(true)
+        fRefreshAction.run();
+      }
+    }
+  }
+
+  public static final String SHOW_RUNNING_PLUGINS = "RegistryView.showRunning.label"; //$NON-NLS-1$
+  public static final String SHOW_ADVANCED_MODE = "RegistryView.showAdvancedMode.label"; //$NON-NLS-1$
+  public static final String GROUP_BY = "RegistryView.groupBy"; //$NON-NLS-1$
+  public static final String SHOW_DISABLED_MODE = "RegistryView.showDisabledMode.label"; //$NON-NLS-1$
+  public static final int BUNDLES = 0;
+  public static final int EXTENSION_REGISTRY = 1;
+  public static final int SERVICES = 2;
+  private FilteredTree fFilteredTree;
+  private TreeViewer fTreeViewer;
+  private IMemento fMemento;
+  private RegistryModel model;
+  private ModelChangeListener listener;
+  private Job initializeModelJob;
+  private RegistryBrowserContentProvider fContentProvider;
+  private RegistryBrowserLabelProvider fLabelProvider;
+  private static final int REFRESH_DELAY = 50;
+  private long lastRefresh = 0;
+  private Thread refreshThread;
+  // menus and action items
+  private Action fRefreshAction;
+  private Action fShowPluginsAction;
+  private Action fCollapseAllAction;
+  private Action fShowAdvancedOperationsAction;
+  private Action fGroupByBundlesAction;
+  private Action fGroupByExtensionPointsAction;
+  private Action fGroupByServicesAction;
+  private Action fShowDisabledAction;
+  private Action fCopyAction;
+  // advanced actions
+  private Action fStartAction;
+  private Action fStopAction;
+  private Action fEnableAction;
+  private Action fDisableAction;
+  private Action fDiagnoseAction;
+// private Clipboard fClipboard;
+  private DrillDownAdapter fDrillDownAdapter;
+  private ViewerFilter fActiveFilter = new ViewerFilter() {
+
+    @Override
+    public boolean select( Viewer viewer, Object parentElement, Object element ) {
+      if( element instanceof ExtensionPoint )
+        element = Platform.getBundle( ( ( ExtensionPoint )element ).getNamespaceIdentifier() );
+      else if( element instanceof Extension )
+        element = Platform.getBundle( ( ( Extension )element ).getNamespaceIdentifier() );
+      if( element instanceof Bundle )
+        return ( ( Bundle )element ).getState() == Bundle.ACTIVE;
+      return true;
+    }
+  };
+  private ViewerFilter fDisabledFilter = new ViewerFilter() {
+
+    @Override
+    public boolean select( Viewer viewer, Object parentElement, Object element ) {
+      if( element instanceof Bundle ) {
+        return !( ( Bundle )element ).isEnabled();
+      }
+      return false;
+    }
+  };
+
+  /*
+   * customized DrillDownAdapter which modifies enabled state of showing active/inactive plug-ins
+   * action - see Bug 58467
+   */
+  class RegistryDrillDownAdapter extends DrillDownAdapter {
+
+    public RegistryDrillDownAdapter( TreeViewer tree ) {
+      super( tree );
+    }
+
+    @Override
+    public void goInto() {
+      super.goInto();
+      fShowPluginsAction.setEnabled( !canGoHome() );
+      fShowDisabledAction.setEnabled( !canGoHome() );
+    }
+
+    @Override
+    public void goBack() {
+      super.goBack();
+      fShowPluginsAction.setEnabled( !canGoHome() );
+      fShowDisabledAction.setEnabled( !canGoHome() );
+    }
+
+    @Override
+    public void goHome() {
+      super.goHome();
+      fShowPluginsAction.setEnabled( !canGoHome() );
+      fShowDisabledAction.setEnabled( !canGoHome() );
+    }
+
+    @Override
+    public void goInto( Object newInput ) {
+      super.goInto( newInput );
+      fShowPluginsAction.setEnabled( !canGoHome() );
+      fShowDisabledAction.setEnabled( !canGoHome() );
+    }
+  }
+
+  private void initializeModel() {
+    model = RegistryModelFactory.getRegistryModel( "local" ); //$NON-NLS-1$
+    fTreeViewer.setInput( model );
+    listener = new RegistryBrowserModelChangeListener( RegistryBrowser.this );
+    model.addModelChangeListener( listener );
+    initializeModelJob = new Job( PDERuntimeMessages.get().RegistryBrowser_InitializingView) {
+
+      @Override
+      public IStatus run( IProgressMonitor monitor ) {
+        model.connect( monitor, true );
+        initializeModelJob = null;
+        return monitor.isCanceled( )
+                                     ? Status.CANCEL_STATUS
+                                     : Status.OK_STATUS;
+      }
+    };
+    initializeModelJob.schedule();
+  }
+
+  @Override
+  public void init( IViewSite site, IMemento memento ) throws PartInitException {
+    super.init( site, memento );
+    if( memento == null )
+      this.fMemento = XMLMemento.createWriteRoot( "REGISTRYVIEW" ); //$NON-NLS-1$
+    else
+      this.fMemento = memento;
+    initializeMemento();
+  }
+
+  private void initializeMemento() {
+    // show all bundles by default (i.e. not just activated ones)
+    if( fMemento.getString( SHOW_RUNNING_PLUGINS ) == null )
+      fMemento.putString( SHOW_RUNNING_PLUGINS, "false" ); //$NON-NLS-1$
+    if( fMemento.getInteger( GROUP_BY ) == null )
+      fMemento.putInteger( GROUP_BY, BUNDLES );
+    if( fMemento.getString( SHOW_DISABLED_MODE ) == null )
+      fMemento.putString( SHOW_DISABLED_MODE, "false" ); //$NON-NLS-1$
+    // default to not showing advanced options to users
+    if( fMemento.getString( SHOW_ADVANCED_MODE ) == null )
+      fMemento.putString( SHOW_ADVANCED_MODE, "false" ); //$NON-NLS-1$
+  }
+
+  @Override
+  public void dispose() {
+    if( initializeModelJob != null ) {
+      initializeModelJob.cancel();
+    }
+    model.disconnect();
+    model.removeModelChangeListener( listener );
+// if( fClipboard != null ) {
+// fClipboard.dispose();
+// }
+    super.dispose();
+  }
+
+  @Override
+  public void createPartControl( Composite parent ) {
+    // create the sash form that will contain the tree viewer & text viewer
+    Composite composite = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.marginHeight = layout.marginWidth = 0;
+    composite.setLayout( layout );
+    composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+    makeActions();
+    createTreeViewer( composite );
+    hookDoubleClickAction();
+    // fClipboard = new Clipboard( fTreeViewer.getTree().getDisplay() );
+    fillToolBar();
+  }
+
+  private void createTreeViewer( Composite parent ) {
+    Composite composite = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.marginHeight = layout.marginWidth = 0;
+    composite.setLayout( layout );
+    composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+    fFilteredTree = new RegistryFilteredTree( this, composite, SWT.MULTI, new PatternFilter() );
+    fFilteredTree.setBackground( parent.getDisplay().getSystemColor( SWT.COLOR_LIST_BACKGROUND ) );
+    Tree tree = fFilteredTree.getViewer().getTree();
+    GridData gd = new GridData( GridData.FILL_BOTH );
+    fFilteredTree.setLayoutData( gd );
+    fTreeViewer = fFilteredTree.getViewer();
+    fContentProvider = new RegistryBrowserContentProvider( this );
+    fTreeViewer.setContentProvider( fContentProvider );
+    fLabelProvider = new RegistryBrowserLabelProvider( this );
+    fTreeViewer.setLabelProvider( fLabelProvider );
+    fTreeViewer.setUseHashlookup( true );
+    fTreeViewer.setComparator( new ViewerComparator() {
+
+      @Override
+      public int compare( Viewer viewer, Object e1, Object e2 ) {
+        // let Comparables compare themselves
+        if( e1 instanceof Comparable
+            && e2 instanceof Comparable
+            && e1.getClass().equals( e2.getClass() ) )
+        {
+          Comparable c1 = ( Comparable )e1;
+          Comparable c2 = ( Comparable )e2;
+          return c1.compareTo( c2 );
+        }
+        if( e1 instanceof Folder && e2 instanceof Folder )
+          return ( ( Folder )e1 ).getId() - ( ( Folder )e2 ).getId();
+        if( e1 instanceof Bundle && e2 instanceof Bundle ) {
+          e1 = ( ( Bundle )e1 ).getSymbolicName();
+          e2 = ( ( Bundle )e2 ).getSymbolicName();
+        }
+        return super.compare( viewer, e1, e2 );
+      }
+    } );
+    if( fShowPluginsAction.isChecked() )
+      fTreeViewer.addFilter( fActiveFilter );
+    if( fShowDisabledAction.isChecked() )
+      fTreeViewer.addFilter( fDisabledFilter );
+    initializeModel();
+    PlatformUI.getWorkbench().getHelpSystem().setHelp( fTreeViewer.getControl(),
+                                                       IHelpContextIds.REGISTRY_VIEW );
+    getViewSite().setSelectionProvider( fTreeViewer );
+    MenuManager popupMenuManager = new MenuManager();
+    IMenuListener listener = new IMenuListener() {
+
+      @Override
+      public void menuAboutToShow( IMenuManager mng ) {
+        fillContextMenu( mng );
+      }
+    };
+    popupMenuManager.setRemoveAllWhenShown( true );
+    popupMenuManager.addMenuListener( listener );
+    Menu menu = popupMenuManager.createContextMenu( tree );
+    tree.setMenu( menu );
+  }
+
+  private void hookDoubleClickAction() {
+    fTreeViewer.addDoubleClickListener( new IDoubleClickListener() {
+
+      @Override
+      public void doubleClick( DoubleClickEvent event ) {
+// IStructuredSelection selection = ( IStructuredSelection )fTreeViewer.getSelection();
+// if( selection.size() == 1 ) {
+// Object obj = selection.getFirstElement();
+// if( obj instanceof Bundle )
+// ManifestEditor.openPluginEditor( ( ( Bundle )obj ).getSymbolicName() );
+// }
+      }
+    } );
+  }
+
+  private void fillToolBar() {
+    fDrillDownAdapter = new RegistryDrillDownAdapter( fTreeViewer );
+    IActionBars bars = getViewSite().getActionBars();
+    bars.setGlobalActionHandler( ActionFactory.COPY.getId(), fCopyAction );
+    IToolBarManager mng = bars.getToolBarManager();
+    fDrillDownAdapter.addNavigationActions( mng );
+    mng.add( fRefreshAction );
+    mng.add( new Separator() );
+    mng.add( fCollapseAllAction );
+    IMenuManager mgr = bars.getMenuManager();
+    IMenuManager manager = new MenuManager( PDERuntimeMessages.get().RegistryBrowser_GroupBy );
+    manager.add( fGroupByBundlesAction );
+    manager.add( fGroupByExtensionPointsAction );
+    manager.add( fGroupByServicesAction );
+    mgr.add( manager );
+    mgr.add( new Separator() );
+    mgr.add( fShowPluginsAction );
+    mgr.add( fShowDisabledAction );
+    mgr.add( new Separator() );
+    mgr.add( fShowAdvancedOperationsAction );
+  }
+
+  private void fillContextMenu( IMenuManager manager ) {
+    manager.add( fRefreshAction );
+    manager.add( new Separator() );
+    manager.add( fCopyAction );
+    manager.add( new Separator() );
+    fDrillDownAdapter.addNavigationActions( manager );
+    manager.add( new Separator() );
+    // check if we should enable advanced actions
+    if( fShowAdvancedOperationsAction.isChecked() && isBundleSelected() ) {
+      // control bundle state actions
+      if( selectedBundlesStopped() )
+        manager.add( fStartAction );
+      if( selectedBundlesStarted() )
+        manager.add( fStopAction );
+      if( getSelectedBundles().size() == 1 )
+        manager.add( fDiagnoseAction );
+      // security related actions
+      if( selectedBundlesDisabled() )
+        manager.add( fEnableAction );
+      if( selectedBundlesEnabled() )
+        manager.add( fDisableAction );
+    }
+    manager.add( new Separator() );
+    manager.add( fShowPluginsAction );
+    manager.add( fShowDisabledAction );
+    manager.add( new Separator() );
+    manager.add( fShowAdvancedOperationsAction );
+  }
+
+  @Override
+  public void saveState( IMemento memento ) {
+    if( memento == null || fMemento == null || fTreeViewer == null )
+      return;
+    fMemento.putString( SHOW_RUNNING_PLUGINS, Boolean.toString( fShowPluginsAction.isChecked() ) );
+    fMemento.putString( SHOW_DISABLED_MODE, Boolean.toString( fShowDisabledAction.isChecked() ) );
+    fMemento.putBoolean( SHOW_ADVANCED_MODE, fShowAdvancedOperationsAction.isChecked() );
+    memento.putMemento( fMemento );
+  }
+
+  @Override
+  public void setFocus() {
+    Text filterText = fFilteredTree.getFilterControl();
+    if( filterText != null ) {
+      filterText.setFocus();
+    }
+  }
+
+  /*
+   * toolbar and context menu actions
+   */
+  private void makeActions() {
+    fRefreshAction = new Action( "refresh") { //$NON-NLS-1$
+
+      @Override
+      public void run() {
+        BusyIndicator.showWhile( fTreeViewer.getTree().getDisplay(), new Runnable() {
+
+          @Override
+          public void run() {
+            refresh( fTreeViewer.getInput() );
+          }
+        } );
+      }
+    };
+    fRefreshAction.setText( PDERuntimeMessages.get().RegistryView_refresh_label );
+    fRefreshAction.setToolTipText( PDERuntimeMessages.get().RegistryView_refresh_tooltip );
+    fRefreshAction.setImageDescriptor( PDERuntimePluginImages.DESC_REFRESH );
+    fRefreshAction.setDisabledImageDescriptor( PDERuntimePluginImages.DESC_REFRESH_DISABLED );
+    fShowPluginsAction = new Action( PDERuntimeMessages.get().RegistryView_showRunning_label) {
+
+      @Override
+      public void run() {
+        if( fShowPluginsAction.isChecked() ) {
+          fTreeViewer.addFilter( fActiveFilter );
+        } else {
+          fTreeViewer.removeFilter( fActiveFilter );
+        }
+        updateTitle( );
+      }
+    };
+    fShowPluginsAction.setChecked( fMemento.getString( SHOW_RUNNING_PLUGINS ).equals( "true" ) ); //$NON-NLS-1$
+    fShowDisabledAction = new Action( PDERuntimeMessages.get().RegistryView_showDisabled_label) {
+
+      @Override
+      public void run() {
+        if( fShowDisabledAction.isChecked() ) {
+          fTreeViewer.addFilter( fDisabledFilter );
+        } else {
+          fTreeViewer.removeFilter( fDisabledFilter );
+        }
+        updateTitle( );
+      }
+    };
+    fShowDisabledAction.setChecked( fMemento.getString( SHOW_DISABLED_MODE ).equals( "true" ) ); //$NON-NLS-1$
+    fCopyAction = new Action( PDERuntimeMessages.get().RegistryBrowser_copy_label) {
+
+      @Override
+      public void run() {
+        ITreeSelection selection = ( ITreeSelection )fFilteredTree.getViewer().getSelection();
+        if( selection.isEmpty() ) {
+          return;
+        }
+// String textVersion = ( ( ILabelProvider )fTreeViewer.getLabelProvider() )
+// .getText( selection.getFirstElement() );
+// if( ( textVersion != null ) && ( textVersion.trim().length() > 0 ) ) {
+// // set the clipboard contents
+// fClipboard.setContents( new Object[] {
+// textVersion
+// }, new Transfer[] {
+// TextTransfer.getInstance()
+// } );
+// }
+      }
+    };
+    fCopyAction.setImageDescriptor( PDERuntimePluginImages.COPY_QNAME );
+    fGroupByBundlesAction = new GroupByAction( PDERuntimeMessages.get().RegistryBrowser_Bundle,
+                                               BUNDLES );
+    int groupBy = getGroupBy();
+    fGroupByBundlesAction.setChecked( groupBy == BUNDLES );
+    fGroupByExtensionPointsAction = new GroupByAction( PDERuntimeMessages
+      .get().RegistryBrowser_ExtensionPoint, EXTENSION_REGISTRY );
+    fGroupByExtensionPointsAction.setChecked( groupBy == EXTENSION_REGISTRY );
+    fGroupByServicesAction = new GroupByAction( PDERuntimeMessages.get().RegistryBrowser_Service,
+                                                SERVICES );
+    fGroupByServicesAction.setChecked( groupBy == SERVICES );
+    fShowAdvancedOperationsAction = new Action( PDERuntimeMessages
+      .get().RegistryView_showAdvanced_label)
+    {
+
+      @Override
+      public void run( ) { // do nothing
+      }
+    };
+    fShowAdvancedOperationsAction
+      .setChecked( fMemento.getString( SHOW_ADVANCED_MODE ).equals( "true" ) ); //$NON-NLS-1$
+    fStartAction = new Action( PDERuntimeMessages.get().RegistryView_startAction_label) {
+
+      @Override
+      public void run() {
+        try {
+          List bundles = getSelectedBundles();
+          for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+            Bundle bundle = ( Bundle )it.next();
+            bundle.start();
+          }
+        } catch( BundleException e ) {
+          PDERuntimePlugin.log( e );
+        }
+      }
+    };
+    fStopAction = new Action( PDERuntimeMessages.get().RegistryView_stopAction_label) {
+
+      @Override
+      public void run() {
+        try {
+          List bundles = getSelectedBundles();
+          for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+            Bundle bundle = ( Bundle )it.next();
+            bundle.stop();
+          }
+        } catch( BundleException e ) {
+          PDERuntimePlugin.log( e );
+        }
+      }
+    };
+    fEnableAction = new Action( PDERuntimeMessages.get().RegistryView_enableAction_label) {
+
+      @Override
+      public void run() {
+        List bundles = getSelectedBundles();
+        for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+          Bundle bundle = ( Bundle )it.next();
+          bundle.enable( );
+        }
+      }
+    };
+    fDisableAction = new Action( PDERuntimeMessages.get().RegistryView_disableAction_label) {
+
+      @Override
+      public void run() {
+        List bundles = getSelectedBundles();
+        for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+          Bundle bundle = ( Bundle )it.next();
+          bundle.disable( );
+        }
+      }
+    };
+    fDiagnoseAction = new Action( PDERuntimeMessages.get().RegistryView_diagnoseAction_label) {
+
+      @Override
+      public void run() {
+        List bundles = getSelectedBundles();
+        for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+          Bundle bundle = ( Bundle )it.next();
+          MultiStatus problems = bundle.diagnose();
+          Dialog dialog;
+          if( ( problems != null ) && ( problems.getChildren().length > 0 ) ) {
+            dialog = new DiagnosticsDialog( getSite().getShell(),
+                                            PDERuntimeMessages.get().RegistryView_diag_dialog_title,
+                                            null,
+                                            problems,
+                                            IStatus.WARNING );
+            dialog.open();
+          } else {
+            MessageDialog
+              .openInformation( getSite().getShell(),
+                                PDERuntimeMessages.get().RegistryView_diag_dialog_title,
+                                PDERuntimeMessages.get().RegistryView_no_unresolved_constraints );
+          }
+        }
+      }
+    };
+    fCollapseAllAction = new Action( "collapseAll") { //$NON-NLS-1$
+
+      @Override
+      public void run() {
+        fTreeViewer.collapseAll( );
+      }
+    };
+    fCollapseAllAction.setText( PDERuntimeMessages.get().RegistryView_collapseAll_label );
+    fCollapseAllAction.setImageDescriptor( PDERuntimePluginImages.DESC_COLLAPSE_ALL );
+    fCollapseAllAction.setToolTipText( PDERuntimeMessages.get().RegistryView_collapseAll_tooltip );
+  }
+
+  public int getGroupBy() {
+    return fMemento.getInteger( GROUP_BY ).intValue();
+  }
+
+  public void updateTitle() {
+    setContentDescription( getTitleSummary() );
+  }
+
+  protected Tree getUndisposedTree() {
+    if( fTreeViewer == null || fTreeViewer.getTree() == null || fTreeViewer.getTree().isDisposed() )
+      return null;
+    return fTreeViewer.getTree();
+  }
+
+  public String getTitleSummary() {
+    Tree tree = getUndisposedTree();
+    String type;
+    int total = 0;
+    switch( getGroupBy() ) {
+      default:
+      case BUNDLES:
+        type = PDERuntimeMessages.get().RegistryBrowser_plugins;
+        total = model.getBundles().length;
+      break;
+      case EXTENSION_REGISTRY:
+        type = PDERuntimeMessages.get().RegistryBrowser_extensionPoints;
+        total = model.getExtensionPoints().length;
+      break;
+      case SERVICES:
+        type = PDERuntimeMessages.get().RegistryBrowser_Services;
+        total = model.getServiceNames().length;
+      break;
+    }
+    if( tree == null )
+      return NLS.bind( PDERuntimeMessages.get().RegistryView_titleSummary, ( new String[] {
+        "0", //$NON-NLS-1$
+        "0", //$NON-NLS-1$
+        type
+      } ) );
+    return NLS.bind( PDERuntimeMessages.get().RegistryView_titleSummary, ( new String[] {
+      Integer.toString( tree.getItemCount() ),
+      Integer.toString( total ),
+      type
+    } ) );
+  }
+
+  private boolean isBundleSelected() {
+    IStructuredSelection selection = ( IStructuredSelection )fTreeViewer.getSelection();
+    if( selection != null ) {
+      Object[] elements = selection.toArray();
+      for( int i = 0; i < elements.length; i++ ) {
+        if( !( elements[ i ] instanceof Bundle ) ) {
+          return false;
+        }
+      }
+    }
+    return true;
+  }
+
+  private List getSelectedBundles() {
+    List bundles = new ArrayList();
+    IStructuredSelection selection = ( IStructuredSelection )fTreeViewer.getSelection();
+    if( selection != null ) {
+      Object[] elements = selection.toArray();
+      for( int i = 0; i < elements.length; i++ ) {
+        if( elements[ i ] instanceof Bundle ) {
+          bundles.add( elements[ i ] );
+        }
+      }
+    }
+    return bundles;
+  }
+
+  /**
+   * @return true if none is stopped, false if at least one is stopped
+   */
+  private boolean selectedBundlesStarted() {
+    List bundles = getSelectedBundles();
+    for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+      Bundle bundle = ( Bundle )it.next();
+      if( bundle.getState() != Bundle.ACTIVE )
+        return false;
+    }
+    return true;
+  }
+
+  /**
+   * @return true if none is active, false if at least one is active
+   */
+  private boolean selectedBundlesStopped() {
+    List bundles = getSelectedBundles();
+    for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+      Bundle bundle = ( Bundle )it.next();
+      if( bundle.getState() == Bundle.ACTIVE )
+        return false;
+    }
+    return true;
+  }
+
+  /**
+   * @return true if none is enabled, false if at least one is enabled
+   */
+  private boolean selectedBundlesDisabled() {
+    List bundles = getSelectedBundles();
+    for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+      Bundle bundle = ( Bundle )it.next();
+      if( bundle.isEnabled() )
+        return false;
+    }
+    return true;
+  }
+
+  /**
+   * @return true if none is disabled, false if at least one is disabled
+   */
+  private boolean selectedBundlesEnabled() {
+    List bundles = getSelectedBundles();
+    for( Iterator it = bundles.iterator(); it.hasNext(); ) {
+      Bundle bundle = ( Bundle )it.next();
+      if( !bundle.isEnabled() )
+        return false;
+    }
+    return true;
+  }
+
+  public void add( Object object ) {
+    Object parent = fContentProvider.getParent( object );
+    if( parent == null ) {
+      add( fTreeViewer.getInput(), object );
+    } else {
+      refresh( parent );
+    }
+  }
+
+  protected void add( Object parent, Object object ) {
+    if( fTreeViewer.getTree().isDisposed() )
+      return;
+    if( fDrillDownAdapter.canGoHome() )
+      return;
+    fTreeViewer.add( parent, object );
+    updateTitle();
+  }
+
+  public void remove( Object object ) {
+    if( fTreeViewer.getTree().isDisposed() )
+      return;
+    if( fDrillDownAdapter.canGoHome() )
+      return;
+    fTreeViewer.remove( object );
+    updateTitle();
+  }
+
+  private boolean filtersEnabled() {
+    return fTreeViewer.getFilters().length > 0;
+  }
+
+  private void deferredRefresh() {
+    if( refreshThread != null )
+      return;
+    long now = System.currentTimeMillis();
+    if( now - lastRefresh > REFRESH_DELAY ) {
+      fTreeViewer.refresh();
+      updateTitle();
+      lastRefresh = now;
+    } else {
+      Runnable runnable = new Runnable() {
+
+        @Override
+        public void run() {
+          try {
+            Thread.sleep( REFRESH_DELAY );
+          } catch( InterruptedException e ) {
+            return;
+          }
+          refreshThread = null;
+          if( fTreeViewer.getTree().isDisposed() )
+            return;
+          fTreeViewer.getTree().getDisplay().asyncExec( new Runnable() {
+
+            @Override
+            public void run() {
+              if( !fTreeViewer.getTree().isDisposed() ) {
+                fTreeViewer.refresh();
+                updateTitle();
+              }
+            }
+          } );
+        }
+      };
+      refreshThread = new Thread( runnable );
+      refreshThread.start();
+    }
+  }
+
+  void refresh( Object[] objects ) {
+    if( fTreeViewer.getTree().isDisposed() )
+      return;
+    if( filtersEnabled() ) {
+      deferredRefresh();
+    } else {
+      for( int i = 0; i < objects.length; i++ ) {
+        fTreeViewer.refresh( objects[ i ] );
+      }
+    }
+    updateTitle();
+  }
+
+  void refresh( Object object ) {
+    if( fTreeViewer.getTree().isDisposed() )
+      return;
+    if( filtersEnabled() ) {
+      deferredRefresh();
+    } else {
+      fTreeViewer.refresh( object );
+      updateTitle();
+    }
+  }
+
+  @Override
+  public Object getAdapter( Class clazz ) {
+    if( ILabelProvider.class.equals( clazz ) ) {
+      return fLabelProvider;
+    }
+    if( IContentProvider.class.equals( clazz ) ) {
+      return fContentProvider;
+    }
+    return super.getAdapter( clazz );
+  }
+
+  /**
+   * Internal api to set group_by value
+   * 
+   * @param newGroupBy returns the old group_by value.
+   */
+  public int showGroupBy( int newGroupBy ) {
+    int previousGroupBy = getGroupBy();
+    if( fTreeViewer != null && !fTreeViewer.getControl().isDisposed() ) {
+      fMemento.putInteger( GROUP_BY, newGroupBy );
+      fRefreshAction.run();
+    }
+    return previousGroupBy;
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java
index f9798b6..4ed6cb9 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserContentProvider.java
@@ -1,145 +1,177 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Wolfgang Schell <ws@jetztgrad.net> - bug 259348

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry;

-

-import java.util.ArrayList;

-import java.util.List;

-import org.eclipse.jface.viewers.*;

-import org.eclipse.pde.internal.runtime.registry.model.*;

-

-

-public class RegistryBrowserContentProvider implements ITreeContentProvider {

-

-  public boolean isInExtensionSet;

-  private RegistryBrowser fRegistryBrowser;

-

-  public RegistryBrowserContentProvider( RegistryBrowser registryBrowser ) {

-    fRegistryBrowser = registryBrowser;

-  }

-

-  public void dispose() { // nothing to dispose

-  }

-

-  public Object[] getElements( Object element ) {

-    return getChildren( element );

-  }

-

-  public Object[] getChildren( Object element ) {

-    if( element instanceof RegistryModel ) {

-      RegistryModel model = ( RegistryModel )element;

-      switch( fRegistryBrowser.getGroupBy() ) {

-        case ( RegistryBrowser.BUNDLES ):

-          return model.getBundles();

-        case ( RegistryBrowser.EXTENSION_REGISTRY ):

-          return model.getExtensionPoints();

-        case ( RegistryBrowser.SERVICES ):

-          return model.getServiceNames();

-      }

-      return null;

-    }

-    if( element instanceof Extension )

-      return ( ( Extension )element ).getConfigurationElements();

-    isInExtensionSet = false;

-    if( element instanceof ExtensionPoint )

-      return ( ( ExtensionPoint )element ).getExtensions().toArray();

-    if( element instanceof ConfigurationElement )

-      return ( ( ConfigurationElement )element ).getElements();

-    if( element instanceof Bundle ) {

-      if( fRegistryBrowser.getGroupBy() != RegistryBrowser.BUNDLES ) // expands only in Bundles mode

-        return null;

-      Bundle bundle = ( Bundle )element;

-      List folders = new ArrayList( 9 );

-      folders.add( new Attribute( Attribute.F_LOCATION, bundle.getLocation() ) );

-      if( bundle.getImports().length > 0 )

-        folders.add( new Folder( Folder.F_IMPORTS, bundle ) );

-      if( bundle.getImportedPackages().length > 0 )

-        folders.add( new Folder( Folder.F_IMPORTED_PACKAGES, bundle ) );

-      if( bundle.getExportedPackages().length > 0 )

-        folders.add( new Folder( Folder.F_EXPORTED_PACKAGES, bundle ) );

-      if( bundle.getLibraries().length > 0 )

-        folders.add( new Folder( Folder.F_LIBRARIES, bundle ) );

-      if( bundle.getExtensionPoints().length > 0 )

-        folders.add( new Folder( Folder.F_EXTENSION_POINTS, bundle ) );

-      if( bundle.getExtensions().length > 0 )

-        folders.add( new Folder( Folder.F_EXTENSIONS, bundle ) );

-      if( bundle.getRegisteredServices().length > 0 )

-        folders.add( new Folder( Folder.F_REGISTERED_SERVICES, bundle ) );

-      if( bundle.getServicesInUse().length > 0 )

-        folders.add( new Folder( Folder.F_SERVICES_IN_USE, bundle ) );

-      if( bundle.getFragments().length > 0 )

-        folders.add( new Folder( Folder.F_FRAGMENTS, bundle ) );

-      return folders.toArray();

-    }

-    isInExtensionSet = false;

-    if( element instanceof Folder ) {

-      Folder folder = ( Folder )element;

-      isInExtensionSet = folder.getId() == Folder.F_EXTENSIONS;

-      ModelObject[] objs = folder.getChildren();

-      if( folder.getId() == Folder.F_USING_BUNDLES ) {

-        ModelObject[] result = new ModelObject[ objs.length ];

-        ILabelProvider labelProvider = ( ILabelProvider )fRegistryBrowser.getAdapter( ILabelProvider.class );

-        for( int i = 0; i < objs.length; i++ ) {

-          result[ i ] = new Attribute( Attribute.F_BUNDLE, labelProvider.getText( objs[ i ] ) );

-        }

-        objs = result;

-      }

-      return objs;

-    }

-    if( element instanceof ConfigurationElement ) {

-      return ( ( ConfigurationElement )element ).getElements();

-    }

-    if( element instanceof ExtensionPoint ) {

-      ExtensionPoint extensionPoint = ( ExtensionPoint )element;

-      Object[] objs = extensionPoint.getExtensions().toArray();

-      return objs;

-    }

-    if( element instanceof ServiceName ) {

-      return ( ( ServiceName )element ).getChildren();

-    }

-    if( element instanceof ServiceRegistration ) {

-      ServiceRegistration service = ( ServiceRegistration )element;

-      List folders = new ArrayList();

-      if( service.getProperties().length > 0 )

-        folders.add( new Folder( Folder.F_PROPERTIES, service ) );

-      if( service.getUsingBundleIds().length > 0 )

-        folders.add( new Folder( Folder.F_USING_BUNDLES, service ) );

-      return folders.toArray();

-    }

-    if( element instanceof Object[] ) {

-      return ( Object[] )element;

-    }

-    return null;

-  }

-

-  public Object getParent( Object element ) {

-    if( !( element instanceof ModelObject ) ) {

-      return null;

-    }

-    if( element instanceof Folder ) {

-      return ( ( Folder )element ).getParent();

-    }

-    return null;

-  }

-

-  public boolean hasChildren( Object element ) {

-    // Bundle and ServiceRegistration always have children

-    if( element instanceof Bundle )

-      return true;

-    if( element instanceof ServiceRegistration )

-      return true;

-    Object[] children = getChildren( element );

-    return children != null && children.length > 0;

-  }

-

-  public void inputChanged( Viewer viewer, Object oldInput, Object newInput ) { // do nothing

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Wolfgang Schell <ws@jetztgrad.net> - bug 259348
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry;
+
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.pde.internal.runtime.registry.model.*;
+
+public class RegistryBrowserContentProvider implements ITreeContentProvider {
+
+	public boolean isInExtensionSet;
+
+	private RegistryBrowser fRegistryBrowser;
+
+	public RegistryBrowserContentProvider(RegistryBrowser registryBrowser) {
+		fRegistryBrowser = registryBrowser;
+	}
+
+	@Override
+	public void dispose() { // nothing to dispose
+	}
+
+	@Override
+	public Object[] getElements(Object element) {
+		return getChildren(element);
+	}
+
+	@Override
+	public Object[] getChildren(Object element) {
+		if (element instanceof RegistryModel) {
+			RegistryModel model = (RegistryModel) element;
+
+			switch (fRegistryBrowser.getGroupBy()) {
+				case (RegistryBrowser.BUNDLES) :
+					return model.getBundles();
+				case (RegistryBrowser.EXTENSION_REGISTRY) :
+					return model.getExtensionPoints();
+				case (RegistryBrowser.SERVICES) :
+					return model.getServiceNames();
+			}
+
+			return null;
+		}
+
+		if (element instanceof Extension)
+			return ((Extension) element).getConfigurationElements();
+
+		isInExtensionSet = false;
+		if (element instanceof ExtensionPoint)
+			return ((ExtensionPoint) element).getExtensions().toArray();
+
+		if (element instanceof ConfigurationElement)
+			return ((ConfigurationElement) element).getElements();
+
+		if (element instanceof Bundle) {
+			if (fRegistryBrowser.getGroupBy() != RegistryBrowser.BUNDLES) // expands only in Bundles mode
+				return null;
+
+			Bundle bundle = (Bundle) element;
+
+			List folders = new ArrayList(9);
+
+			folders.add(new Attribute(Attribute.F_LOCATION, bundle.getLocation()));
+			if (bundle.getImports().length > 0)
+				folders.add(new Folder(Folder.F_IMPORTS, bundle));
+			if (bundle.getImportedPackages().length > 0)
+				folders.add(new Folder(Folder.F_IMPORTED_PACKAGES, bundle));
+			if (bundle.getExportedPackages().length > 0)
+				folders.add(new Folder(Folder.F_EXPORTED_PACKAGES, bundle));
+			if (bundle.getLibraries().length > 0)
+				folders.add(new Folder(Folder.F_LIBRARIES, bundle));
+			if (bundle.getExtensionPoints().length > 0)
+				folders.add(new Folder(Folder.F_EXTENSION_POINTS, bundle));
+			if (bundle.getExtensions().length > 0)
+				folders.add(new Folder(Folder.F_EXTENSIONS, bundle));
+			if (bundle.getRegisteredServices().length > 0)
+				folders.add(new Folder(Folder.F_REGISTERED_SERVICES, bundle));
+			if (bundle.getServicesInUse().length > 0)
+				folders.add(new Folder(Folder.F_SERVICES_IN_USE, bundle));
+			if (bundle.getFragments().length > 0)
+				folders.add(new Folder(Folder.F_FRAGMENTS, bundle));
+
+			return folders.toArray();
+		}
+
+		isInExtensionSet = false;
+
+		if (element instanceof Folder) {
+			Folder folder = (Folder) element;
+			isInExtensionSet = folder.getId() == Folder.F_EXTENSIONS;
+			ModelObject[] objs = folder.getChildren();
+			if (folder.getId() == Folder.F_USING_BUNDLES) {
+				ModelObject[] result = new ModelObject[objs.length];
+				ILabelProvider labelProvider = (ILabelProvider) fRegistryBrowser.getAdapter(ILabelProvider.class);
+
+				for (int i = 0; i < objs.length; i++) {
+					result[i] = new Attribute(Attribute.F_BUNDLE, labelProvider.getText(objs[i]));
+				}
+
+				objs = result;
+			}
+			return objs;
+		}
+		if (element instanceof ConfigurationElement) {
+			return ((ConfigurationElement) element).getElements();
+		}
+
+		if (element instanceof ExtensionPoint) {
+			ExtensionPoint extensionPoint = (ExtensionPoint) element;
+			Object[] objs = extensionPoint.getExtensions().toArray();
+			return objs;
+		}
+
+		if (element instanceof ServiceName) {
+			return ((ServiceName) element).getChildren();
+		}
+
+		if (element instanceof ServiceRegistration) {
+			ServiceRegistration service = (ServiceRegistration) element;
+
+			List folders = new ArrayList();
+
+			if (service.getProperties().length > 0)
+				folders.add(new Folder(Folder.F_PROPERTIES, service));
+			if (service.getUsingBundleIds().length > 0)
+				folders.add(new Folder(Folder.F_USING_BUNDLES, service));
+
+			return folders.toArray();
+		}
+
+		if (element instanceof Object[]) {
+			return (Object[]) element;
+		}
+
+		return null;
+	}
+
+	@Override
+	public Object getParent(Object element) {
+		if (!(element instanceof ModelObject)) {
+			return null;
+		}
+
+		if (element instanceof Folder) {
+			return ((Folder) element).getParent();
+		}
+
+		return null;
+	}
+
+	@Override
+	public boolean hasChildren(Object element) {
+		// Bundle and ServiceRegistration always have children
+		if (element instanceof Bundle)
+			return true;
+		if (element instanceof ServiceRegistration)
+			return true;
+
+		Object[] children = getChildren(element);
+		return children != null && children.length > 0;
+	}
+
+	@Override
+	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { // do nothing
+	}
+
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserModelChangeListener.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserModelChangeListener.java
index a577d75..25cdbb9 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserModelChangeListener.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryBrowserModelChangeListener.java
@@ -1,143 +1,143 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry;

-

-import org.eclipse.pde.internal.runtime.registry.model.*;

-import org.eclipse.swt.widgets.Display;

-

-

-public class RegistryBrowserModelChangeListener implements ModelChangeListener {

-

-  private RegistryBrowser fRegistryBrowser;

-  private Display fDisplay;

-

-  public RegistryBrowserModelChangeListener( RegistryBrowser registryBrowser, Display display ) {

-    fRegistryBrowser = registryBrowser;

-    fDisplay = display;

-  }

-

-  public void modelChanged( final ModelChangeDelta[] delta ) {

-    fDisplay.asyncExec( new Runnable() {

-

-      public void run() {

-        update( delta );

-      }

-    } );

-  }

-

-  private boolean topLevelElement( Object object ) {

-    switch( fRegistryBrowser.getGroupBy() ) {

-      case ( RegistryBrowser.BUNDLES ):

-        return object instanceof Bundle;

-      case ( RegistryBrowser.EXTENSION_REGISTRY ):

-        return object instanceof ExtensionPoint;

-      case ( RegistryBrowser.SERVICES ):

-        return object instanceof ServiceName;

-    }

-    return false;

-  }

-

-  /**

-   * TODO FIXME this should be moved to content provider getParent

-   * 

-   * @param object

-   * @return if returns array, then appears under all top level elements of that array

-   */

-  private Object getTopLevelElement( Object object ) {

-    if( fRegistryBrowser.getGroupBy() == RegistryBrowser.BUNDLES ) {

-      if( object instanceof Bundle ) {

-        return object;

-      } else if( object instanceof ExtensionPoint ) {

-        ExtensionPoint ext = ( ExtensionPoint )object;

-        return ext.getContributor();

-      } else if( object instanceof Extension ) {

-        Extension ext = ( Extension )object;

-        return ext.getContributor();

-      } else if( object instanceof ServiceRegistration ) {

-        ServiceRegistration reg = ( ServiceRegistration )object;

-        Bundle[] bundles = reg.getUsingBundles();

-        if( bundles.length == 0 ) {

-          return reg.getBundle();

-        }

-        Object[] result = new Object[ bundles.length + 1 ];

-        result[ 0 ] = reg.getBundle();

-        System.arraycopy( bundles, 0, result, 1, bundles.length );

-        return result;

-      }

-    } else if( fRegistryBrowser.getGroupBy() == RegistryBrowser.EXTENSION_REGISTRY ) {

-      if( object instanceof ExtensionPoint ) {

-        return object;

-      } else if( object instanceof Extension ) {

-        Extension ext = ( Extension )object;

-        return ext.getExtensionPoint();

-      }

-    } else if( fRegistryBrowser.getGroupBy() == RegistryBrowser.SERVICES ) {

-      if( object instanceof ServiceRegistration ) {

-        ServiceRegistration service = ( ServiceRegistration )object;

-        return service.getName();

-      } else if( object instanceof Bundle ) {

-        Object[] services = ( ( Bundle )object ).getServicesInUse();

-        for( int i = 0; i < services.length; i++ ) {

-          ServiceRegistration service = ( ( ServiceRegistration )services[ i ] );

-          services[ i ] = service.getName();

-        }

-        return services;

-      }

-    }

-    return null;

-  }

-

-  private void refreshTopLevelElements( Object object ) {

-    Object topLevelElement = getTopLevelElement( object );

-    if( topLevelElement == null )

-      return;

-    if( topLevelElement.getClass().isArray() ) {

-      Object[] array = ( Object[] )topLevelElement;

-      fRegistryBrowser.refresh( array );

-    } else {

-      fRegistryBrowser.refresh( topLevelElement );

-    }

-  }

-

-  protected void update( ModelChangeDelta[] deltas ) {

-    for( int i = 0; i < deltas.length; i++ ) {

-      ModelObject object = deltas[ i ].getModelObject();

-      int flag = deltas[ i ].getFlag();

-      switch( flag ) {

-        case ModelChangeDelta.ADDED:

-          if( topLevelElement( object ) ) {

-            fRegistryBrowser.add( object );

-          } else {

-            refreshTopLevelElements( object );

-          }

-        break;

-        case ModelChangeDelta.REMOVED:

-          if( topLevelElement( object ) ) {

-            fRegistryBrowser.remove( object );

-          } else {

-            refreshTopLevelElements( object );

-          }

-        break;

-        case ModelChangeDelta.STARTED:

-        case ModelChangeDelta.STOPPED:

-        case ModelChangeDelta.RESOLVED:

-        case ModelChangeDelta.UNRESOLVED:

-        case ModelChangeDelta.UPDATED:

-          if( topLevelElement( object ) ) {

-            fRegistryBrowser.refresh( object );

-          } else {

-            refreshTopLevelElements( object );

-          }

-        break;

-      }

-    }

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2015 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry;
+
+import org.eclipse.pde.internal.runtime.registry.model.*;
+
+public class RegistryBrowserModelChangeListener implements ModelChangeListener {
+
+	private RegistryBrowser fRegistryBrowser;
+
+	public RegistryBrowserModelChangeListener(RegistryBrowser registryBrowser) {
+		fRegistryBrowser = registryBrowser;
+	}
+
+	@Override
+	public void modelChanged(final ModelChangeDelta[] delta) {
+		fRegistryBrowser.getSite().getWorkbenchWindow().getWorkbench().getDisplay().asyncExec(new Runnable() {
+			@Override
+			public void run() {
+				update(delta);
+			}
+		});
+	}
+
+	private boolean topLevelElement(Object object) {
+		switch (fRegistryBrowser.getGroupBy()) {
+			case (RegistryBrowser.BUNDLES) :
+				return object instanceof Bundle;
+			case (RegistryBrowser.EXTENSION_REGISTRY) :
+				return object instanceof ExtensionPoint;
+			case (RegistryBrowser.SERVICES) :
+				return object instanceof ServiceName;
+		}
+
+		return false;
+	}
+
+	/**
+	 * TODO FIXME this should be moved to content provider getParent
+	 *
+	 * @param object
+	 * @return if returns array, then appears under all top level elements of that array
+	 */
+	private Object getTopLevelElement(Object object) {
+		if (fRegistryBrowser.getGroupBy() == RegistryBrowser.BUNDLES) {
+			if (object instanceof Bundle) {
+				return object;
+			} else if (object instanceof ExtensionPoint) {
+				ExtensionPoint ext = (ExtensionPoint) object;
+				return ext.getContributor();
+			} else if (object instanceof Extension) {
+				Extension ext = (Extension) object;
+				return ext.getContributor();
+			} else if (object instanceof ServiceRegistration) {
+				ServiceRegistration reg = (ServiceRegistration) object;
+
+				Bundle[] bundles = reg.getUsingBundles();
+				if (bundles.length == 0) {
+					return reg.getBundle();
+				}
+
+				Object[] result = new Object[bundles.length + 1];
+				result[0] = reg.getBundle();
+				System.arraycopy(bundles, 0, result, 1, bundles.length);
+
+				return result;
+			}
+		} else if (fRegistryBrowser.getGroupBy() == RegistryBrowser.EXTENSION_REGISTRY) {
+			if (object instanceof ExtensionPoint) {
+				return object;
+			} else if (object instanceof Extension) {
+				Extension ext = (Extension) object;
+				return ext.getExtensionPoint();
+			}
+		} else if (fRegistryBrowser.getGroupBy() == RegistryBrowser.SERVICES) {
+			if (object instanceof ServiceRegistration) {
+				ServiceRegistration service = (ServiceRegistration) object;
+				return service.getName();
+			} else if (object instanceof Bundle) {
+				return ((Bundle) object).getServicesInUse();
+			}
+		}
+
+		return null;
+	}
+
+	private void refreshTopLevelElements(Object object) {
+		Object topLevelElement = getTopLevelElement(object);
+
+		if (topLevelElement == null)
+			return;
+
+		if (topLevelElement.getClass().isArray()) {
+			Object[] array = (Object[]) topLevelElement;
+			fRegistryBrowser.refresh(array);
+		} else {
+			fRegistryBrowser.refresh(topLevelElement);
+		}
+	}
+
+	protected void update(ModelChangeDelta[] deltas) {
+		for (int i = 0; i < deltas.length; i++) {
+			ModelObject object = deltas[i].getModelObject();
+			int flag = deltas[i].getFlag();
+
+			switch (flag) {
+				case ModelChangeDelta.ADDED :
+					if (topLevelElement(object)) {
+						fRegistryBrowser.add(object);
+					} else {
+						refreshTopLevelElements(object);
+					}
+					break;
+				case ModelChangeDelta.REMOVED :
+					if (topLevelElement(object)) {
+						fRegistryBrowser.remove(object);
+					} else {
+						refreshTopLevelElements(object);
+					}
+					break;
+				case ModelChangeDelta.STARTED :
+				case ModelChangeDelta.STOPPED :
+				case ModelChangeDelta.RESOLVED :
+				case ModelChangeDelta.UNRESOLVED :
+				case ModelChangeDelta.UPDATED :
+					if (topLevelElement(object)) {
+						fRegistryBrowser.refresh(object);
+					} else {
+						refreshTopLevelElements(object);
+					}
+					break;
+			}
+		}
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
index 0e8d4be..3028be3 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/RegistryFilteredTree.java
@@ -1,61 +1,62 @@
-/*******************************************************************************

- * Copyright (c) 2006, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry;

-

-import org.eclipse.swt.layout.*;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.ui.dialogs.FilteredTree;

-import org.eclipse.ui.dialogs.PatternFilter;

-

-

-public class RegistryFilteredTree extends FilteredTree {

-

-  private RegistryBrowser browser;

-

-  public RegistryFilteredTree( RegistryBrowser browser,

-                               Composite parent,

-                               int treeStyle,

-                               PatternFilter filter )

-  {

-    super( parent, treeStyle, filter, true );

-    this.browser = browser;

-  }

-

-  protected void createControl( Composite parent, int treeStyle ) {

-    super.createControl( parent, treeStyle );

-    // add 2px margin around filter text

-    FormLayout layout = new FormLayout();

-    layout.marginHeight = 0;

-    layout.marginWidth = 0;

-    setLayout( layout );

-    FormData data = new FormData();

-    data.left = new FormAttachment( 0, 0 );

-    data.right = new FormAttachment( 100, 0 );

-    data.bottom = new FormAttachment( 100, 0 );

-    if( showFilterControls ) {

-      FormData filterData = new FormData();

-      filterData.top = new FormAttachment( 0, 2 );

-      filterData.left = new FormAttachment( 0, 2 );

-      filterData.right = new FormAttachment( 100, -2 );

-      filterComposite.setLayoutData( filterData );

-      data.top = new FormAttachment( filterComposite, 2 );

-    } else {

-      data.top = new FormAttachment( 0, 0 );

-    }

-    treeComposite.setLayoutData( data );

-  }

-

-  protected void updateToolbar( boolean visible ) {

-    super.updateToolbar( visible );

-    // update view title on viewer's toolbar update

-    browser.updateTitle();

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2006, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry;
+
+import org.eclipse.swt.layout.*;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+
+public class RegistryFilteredTree extends FilteredTree {
+
+	private RegistryBrowser browser;
+
+	public RegistryFilteredTree(RegistryBrowser browser, Composite parent, int treeStyle, PatternFilter filter) {
+		super(parent, treeStyle, filter, true);
+		this.browser = browser;
+	}
+
+	@Override
+	protected void createControl(Composite parent, int treeStyle) {
+		super.createControl(parent, treeStyle);
+
+		// add 2px margin around filter text
+
+		FormLayout layout = new FormLayout();
+		layout.marginHeight = 0;
+		layout.marginWidth = 0;
+		setLayout(layout);
+
+		FormData data = new FormData();
+		data.left = new FormAttachment(0, 0);
+		data.right = new FormAttachment(100, 0);
+		data.bottom = new FormAttachment(100, 0);
+		if (showFilterControls) {
+			FormData filterData= new FormData();
+			filterData.top = new FormAttachment(0, 2);
+			filterData.left = new FormAttachment(0, 2);
+			filterData.right = new FormAttachment(100, -2);
+			filterComposite.setLayoutData(filterData);
+			data.top = new FormAttachment(filterComposite, 2);
+		} else {
+			data.top = new FormAttachment(0, 0);
+		}
+		treeComposite.setLayoutData(data);
+	}
+
+	@Override
+	protected void updateToolbar(boolean visible) {
+		super.updateToolbar(visible);
+
+		// update view title on viewer's toolbar update
+		browser.updateTitle();
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Attribute.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Attribute.java
index e51533d..cc153d1 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Attribute.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Attribute.java
@@ -1,44 +1,45 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class Attribute extends ModelObject {

-

-  public static final String F_LOCATION = "Location"; //$NON-NLS-1$

-  public static final String F_BUNDLE = "Bundle"; //$NON-NLS-1$

-  private String name;

-  private String value;

-

-  public Attribute() {

-    // empty

-  }

-

-  public Attribute( String name, String value ) {

-    this.name = name;

-    this.value = value;

-  }

-

-  public String getValue() {

-    return value;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public void setName( String name ) {

-    this.name = name;

-  }

-

-  public void setValue( String value ) {

-    this.value = value;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class Attribute extends ModelObject {
+	public static final String F_LOCATION = "Location"; //$NON-NLS-1$
+
+	public static final String F_BUNDLE = "Bundle"; //$NON-NLS-1$
+
+	private String name;
+	private String value;
+
+	public Attribute() {
+		// empty
+	}
+
+	public Attribute(String name, String value) {
+		this.name = name;
+		this.value = value;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BackendChangeListener.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BackendChangeListener.java
index 033d955..91fcb86 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BackendChangeListener.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BackendChangeListener.java
@@ -1,38 +1,39 @@
-/*******************************************************************************

- * Copyright (c) 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-/**

- * Notifies on any changes coming from backend. Usually RegistryModel is only interested in

- * receiving news about that.

- */

-public interface BackendChangeListener {

-

-  void addBundle( Bundle adapter );

-

-  void removeBundle( Bundle adapter );

-

-  void updateBundle( Bundle adapter, int updated );

-

-  void addService( ServiceRegistration adapter );

-

-  void removeService( ServiceRegistration adapter );

-

-  void updateService( ServiceRegistration adapter );

-

-  void addExtensions( Extension[] extensions );

-

-  void removeExtensions( Extension[] extensions );

-

-  void addExtensionPoints( ExtensionPoint[] extensionPoints );

-

-  void removeExtensionPoints( ExtensionPoint[] extensionPoints );

-}

+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+/**
+ * Notifies on any changes coming from backend. Usually RegistryModel is only interested in receiving
+ * news about that.
+ *
+ */
+public interface BackendChangeListener {
+
+	void addBundle(Bundle adapter);
+
+	void removeBundle(Bundle adapter);
+
+	void updateBundle(Bundle adapter, int updated);
+
+	void addService(ServiceRegistration adapter);
+
+	void removeService(ServiceRegistration adapter);
+
+	void updateService(ServiceRegistration adapter);
+
+	void addExtensions(Extension[] extensions);
+
+	void removeExtensions(Extension[] extensions);
+
+	void addExtensionPoints(ExtensionPoint[] extensionPoints);
+
+	void removeExtensionPoints(ExtensionPoint[] extensionPoints);
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Bundle.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Bundle.java
index 4d78ecf..81bf264 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Bundle.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Bundle.java
@@ -1,234 +1,244 @@
-/*******************************************************************************

- * Copyright (c) 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import java.util.*;

-import org.eclipse.core.runtime.MultiStatus;

-import org.osgi.framework.BundleException;

-

-

-public class Bundle extends ModelObject {

-

-  public static final int ACTIVE = org.osgi.framework.Bundle.ACTIVE;

-  public static final int UNINSTALLED = org.osgi.framework.Bundle.UNINSTALLED;

-  public static final int INSTALLED = org.osgi.framework.Bundle.INSTALLED;

-  private String symbolicName;

-  private String location;

-  private boolean isEnabled;

-  private BundlePrerequisite[] imports = new BundlePrerequisite[ 0 ];

-  private String version;

-  private int state;

-  private long id;

-  private BundleLibrary[] libraries = new BundleLibrary[ 0 ];

-  private BundlePrerequisite[] importedPackages = new BundlePrerequisite[ 0 ];

-  private BundlePrerequisite[] exportedPackages = new BundlePrerequisite[ 0 ];

-  private String fragmentHost;

-  private String fragmentHostVersion;

-

-  public void setFragmentHost( String fragmentHost ) {

-    this.fragmentHost = fragmentHost;

-  }

-

-  public String getFragmentHost() {

-    return fragmentHost;

-  }

-

-  public String getFragmentHostVersion() {

-    return fragmentHostVersion;

-  }

-

-  public void setFragmentHostVersion( String fragmentHostVersion ) {

-    this.fragmentHostVersion = fragmentHostVersion;

-  }

-

-  public void setSymbolicName( String symbolicName ) {

-    this.symbolicName = symbolicName;

-  }

-

-  public void setLocation( String location ) {

-    this.location = location;

-  }

-

-  public void setImports( BundlePrerequisite[] imports ) {

-    if( imports == null )

-      throw new IllegalArgumentException();

-    this.imports = imports;

-  }

-

-  public void setVersion( String version ) {

-    this.version = version;

-  }

-

-  public void setState( int state ) {

-    this.state = state;

-  }

-

-  public void setId( long id ) {

-    this.id = id;

-  }

-

-  public void setEnabled( boolean enabled ) {

-    isEnabled = enabled;

-  }

-

-  public void setLibraries( BundleLibrary[] libraries ) {

-    if( libraries == null )

-      throw new IllegalArgumentException();

-    this.libraries = libraries;

-  }

-

-  public String getSymbolicName() {

-    return symbolicName;

-  }

-

-  public boolean isEnabled() {

-    return isEnabled;

-  }

-

-  public BundlePrerequisite[] getImports() {

-    return imports;

-  }

-

-  public BundleLibrary[] getLibraries() {

-    return libraries;

-  }

-

-  public String getLocation() {

-    return location;

-  }

-

-  public String getVersion() {

-    return version;

-  }

-

-  public int getState() {

-    return state;

-  }

-

-  public long getId() {

-    return id;

-  }

-

-  public void start() throws BundleException {

-    if( model == null )

-      return;

-    model.backend.start( id );

-  }

-

-  public void stop() throws BundleException {

-    if( model == null )

-      return;

-    model.backend.stop( id );

-  }

-

-  public void enable() {

-    if( model == null )

-      return;

-    model.backend.setEnabled( id, true );

-  }

-

-  public void disable() {

-    if( model == null )

-      return;

-    model.backend.setEnabled( id, false );

-  }

-

-  public MultiStatus diagnose() {

-    if( model == null )

-      return null;

-    return model.backend.diagnose( id );

-  }

-

-  public ExtensionPoint[] getExtensionPoints() {

-    if( model == null )

-      return new ExtensionPoint[ 0 ];

-    ExtensionPoint[] extPoints = model.getExtensionPoints();

-    List result = new ArrayList();

-    for( int i = 0; i < extPoints.length; i++ ) {

-      if( extPoints[ i ].getContributorId().longValue() == id )

-        result.add( extPoints[ i ] );

-    }

-    return ( ExtensionPoint[] )result.toArray( new ExtensionPoint[ result.size() ] );

-  }

-

-  public Extension[] getExtensions() {

-    if( model == null )

-      return new Extension[ 0 ];

-    ExtensionPoint[] extPoints = model.getExtensionPoints();

-    List result = new ArrayList();

-    for( int i = 0; i < extPoints.length; i++ ) {

-      for( Iterator it = extPoints[ i ].getExtensions().iterator(); it.hasNext(); ) {

-        Extension a = ( Extension )it.next();

-        if( a.getContributorId().longValue() == id )

-          result.add( a );

-      }

-    }

-    return ( Extension[] )result.toArray( new Extension[ result.size() ] );

-  }

-

-  public ServiceRegistration[] getRegisteredServices() {

-    if( model == null )

-      return new ServiceRegistration[ 0 ];

-    ServiceRegistration[] services = model.getServices();

-    List result = new ArrayList();

-    for( int i = 0; i < services.length; i++ ) {

-      if( symbolicName.equals( services[ i ].getBundle() ) )

-        result.add( services[ i ] );

-    }

-    return ( ServiceRegistration[] )result.toArray( new ServiceRegistration[ result.size() ] );

-  }

-

-  public ServiceRegistration[] getServicesInUse() {

-    if( model == null )

-      return new ServiceRegistration[ 0 ];

-    ServiceRegistration[] services = model.getServices();

-    List result = new ArrayList();

-    for( int i = 0; i < services.length; i++ ) {

-      long[] usingBundles = services[ i ].getUsingBundleIds();

-      if( usingBundles != null ) {

-        for( int j = 0; j < usingBundles.length; j++ )

-          if( id == usingBundles[ j ] )

-            result.add( services[ i ] );

-      }

-    }

-    return ( ServiceRegistration[] )result.toArray( new ServiceRegistration[ result.size() ] );

-  }

-

-  public boolean equals( Object obj ) {

-    return ( obj instanceof Bundle ) && ( id == ( ( Bundle )obj ).id );

-  }

-

-  public int hashCode() {

-    return ( int )id;

-  }

-

-  public Bundle[] getFragments() {

-    if( model == null )

-      return new Bundle[ 0 ];

-    return model.getFragments( this );

-  }

-

-  public void setImportedPackages( BundlePrerequisite[] importedPackages ) {

-    this.importedPackages = importedPackages;

-  }

-

-  public BundlePrerequisite[] getImportedPackages() {

-    return importedPackages;

-  }

-

-  public void setExportedPackages( BundlePrerequisite[] exportedPackages ) {

-    this.exportedPackages = exportedPackages;

-  }

-

-  public BundlePrerequisite[] getExportedPackages() {

-    return exportedPackages;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import java.util.*;
+import org.eclipse.core.runtime.MultiStatus;
+import org.osgi.framework.BundleException;
+
+public class Bundle extends ModelObject {
+
+	public static final int ACTIVE = org.osgi.framework.Bundle.ACTIVE;
+	public static final int UNINSTALLED = org.osgi.framework.Bundle.UNINSTALLED;
+	public static final int INSTALLED = org.osgi.framework.Bundle.INSTALLED;
+
+	private String symbolicName;
+	private String location;
+	private boolean isEnabled;
+	private BundlePrerequisite[] imports = new BundlePrerequisite[0];
+	private String version;
+	private int state;
+	private long id;
+	private BundleLibrary[] libraries = new BundleLibrary[0];
+	private BundlePrerequisite[] importedPackages = new BundlePrerequisite[0];
+	private BundlePrerequisite[] exportedPackages = new BundlePrerequisite[0];
+
+	private String fragmentHost;
+	private String fragmentHostVersion;
+
+	public void setFragmentHost(String fragmentHost) {
+		this.fragmentHost = fragmentHost;
+	}
+
+	public String getFragmentHost() {
+		return fragmentHost;
+	}
+
+	public String getFragmentHostVersion() {
+		return fragmentHostVersion;
+	}
+
+	public void setFragmentHostVersion(String fragmentHostVersion) {
+		this.fragmentHostVersion = fragmentHostVersion;
+	}
+
+	public void setSymbolicName(String symbolicName) {
+		this.symbolicName = symbolicName;
+	}
+
+	public void setLocation(String location) {
+		this.location = location;
+	}
+
+	public void setImports(BundlePrerequisite[] imports) {
+		if (imports == null)
+			throw new IllegalArgumentException();
+
+		this.imports = imports;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public void setState(int state) {
+		this.state = state;
+	}
+
+	public void setId(long id) {
+		this.id = id;
+	}
+
+	public void setEnabled(boolean enabled) {
+		isEnabled = enabled;
+	}
+
+	public void setLibraries(BundleLibrary[] libraries) {
+		if (libraries == null)
+			throw new IllegalArgumentException();
+
+		this.libraries = libraries;
+	}
+
+	public String getSymbolicName() {
+		return symbolicName;
+	}
+
+	public boolean isEnabled() {
+		return isEnabled;
+	}
+
+	public BundlePrerequisite[] getImports() {
+		return imports;
+	}
+
+	public BundleLibrary[] getLibraries() {
+		return libraries;
+	}
+
+	public String getLocation() {
+		return location;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+
+	public int getState() {
+		return state;
+	}
+
+	public long getId() {
+		return id;
+	}
+
+	public void start() throws BundleException {
+		if (model == null)
+			return;
+		model.backend.start(id);
+	}
+
+	public void stop() throws BundleException {
+		if (model == null)
+			return;
+		model.backend.stop(id);
+	}
+
+	public void enable() {
+		if (model == null)
+			return;
+		model.backend.setEnabled(id, true);
+	}
+
+	public void disable() {
+		if (model == null)
+			return;
+		model.backend.setEnabled(id, false);
+	}
+
+	public MultiStatus diagnose() {
+		if (model == null)
+			return null;
+		return model.backend.diagnose(id);
+	}
+
+	public ExtensionPoint[] getExtensionPoints() {
+		if (model == null)
+			return new ExtensionPoint[0];
+		ExtensionPoint[] extPoints = model.getExtensionPoints();
+		List result = new ArrayList();
+
+		for (int i = 0; i < extPoints.length; i++) {
+			if (extPoints[i].getContributorId().longValue() == id)
+				result.add(extPoints[i]);
+		}
+		return (ExtensionPoint[]) result.toArray(new ExtensionPoint[result.size()]);
+	}
+
+	public Extension[] getExtensions() {
+		if (model == null)
+			return new Extension[0];
+		ExtensionPoint[] extPoints = model.getExtensionPoints();
+		List result = new ArrayList();
+
+		for (int i = 0; i < extPoints.length; i++) {
+			for (Iterator it = extPoints[i].getExtensions().iterator(); it.hasNext();) {
+				Extension a = (Extension) it.next();
+				if (a.getContributorId().longValue() == id)
+					result.add(a);
+			}
+
+		}
+		return (Extension[]) result.toArray(new Extension[result.size()]);
+	}
+
+	public ServiceRegistration[] getRegisteredServices() {
+		if (model == null)
+			return new ServiceRegistration[0];
+		ServiceRegistration[] services = model.getServices();
+		List result = new ArrayList();
+
+		for (int i = 0; i < services.length; i++) {
+			if (symbolicName.equals(services[i].getBundle()))
+				result.add(services[i]);
+		}
+		return (ServiceRegistration[]) result.toArray(new ServiceRegistration[result.size()]);
+	}
+
+	public ServiceRegistration[] getServicesInUse() {
+		if (model == null)
+			return new ServiceRegistration[0];
+		ServiceRegistration[] services = model.getServices();
+		List result = new ArrayList();
+
+		for (int i = 0; i < services.length; i++) {
+			long[] usingBundles = services[i].getUsingBundleIds();
+			if (usingBundles != null) {
+				for (int j = 0; j < usingBundles.length; j++)
+					if (id == usingBundles[j])
+						result.add(services[i]);
+			}
+		}
+		return (ServiceRegistration[]) result.toArray(new ServiceRegistration[result.size()]);
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		return (obj instanceof Bundle) && (id == ((Bundle) obj).id);
+	}
+
+	@Override
+	public int hashCode() {
+		return (int) id;
+	}
+
+	public Bundle[] getFragments() {
+		if (model == null)
+			return new Bundle[0];
+		return model.getFragments(this);
+	}
+
+	public void setImportedPackages(BundlePrerequisite[] importedPackages) {
+		this.importedPackages = importedPackages;
+	}
+
+	public BundlePrerequisite[] getImportedPackages() {
+		return importedPackages;
+	}
+
+	public void setExportedPackages(BundlePrerequisite[] exportedPackages) {
+		this.exportedPackages = exportedPackages;
+	}
+
+	public BundlePrerequisite[] getExportedPackages() {
+		return exportedPackages;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundleLibrary.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundleLibrary.java
index 1cc003f..17d54d0 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundleLibrary.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundleLibrary.java
@@ -1,24 +1,24 @@
-/*******************************************************************************

- *  Copyright (c) 2006, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class BundleLibrary extends ModelObject {

-

-  private String library;

-

-  public String getLibrary() {

-    return library;

-  }

-

-  public void setLibrary( String name ) {

-    library = name;

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2006, 2008 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class BundleLibrary extends ModelObject {
+
+	private String library;
+
+	public String getLibrary() {
+		return library;
+	}
+
+	public void setLibrary(String name) {
+		library = name;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundlePrerequisite.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundlePrerequisite.java
index 8b031cb..9bc623f 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundlePrerequisite.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/BundlePrerequisite.java
@@ -1,51 +1,51 @@
-/*******************************************************************************

- * Copyright (c) 2006, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class BundlePrerequisite extends ModelObject {

-

-  private boolean isExported;

-  private String name;

-  private String version;

-  private boolean isPackage;

-

-  public void setPackage( boolean isPackage ) {

-    this.isPackage = isPackage;

-  }

-

-  public boolean isPackage() {

-    return isPackage;

-  }

-

-  public void setExported( boolean isExported ) {

-    this.isExported = isExported;

-  }

-

-  public void setName( String name ) {

-    this.name = name;

-  }

-

-  public void setVersion( String version ) {

-    this.version = version;

-  }

-

-  public boolean isExported() {

-    return isExported;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public String getVersion() {

-    return version;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2006, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class BundlePrerequisite extends ModelObject {
+
+	private boolean isExported;
+	private String name;
+	private String version;
+	private boolean isPackage;
+
+	public void setPackage(boolean isPackage) {
+		this.isPackage = isPackage;
+	}
+
+	public boolean isPackage() {
+		return isPackage;
+	}
+
+	public void setExported(boolean isExported) {
+		this.isExported = isExported;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setVersion(String version) {
+		this.version = version;
+	}
+
+	public boolean isExported() {
+		return isExported;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String getVersion() {
+		return version;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ConfigurationElement.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ConfigurationElement.java
index b87c65c..aa416eb 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ConfigurationElement.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ConfigurationElement.java
@@ -1,26 +1,27 @@
-/*******************************************************************************

- * Copyright (c) 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class ConfigurationElement extends Attribute {

-

-  private Attribute[] elements = new Attribute[ 0 ];

-

-  public void setElements( Attribute[] elements ) {

-    if( elements == null )

-      throw new IllegalArgumentException();

-    this.elements = elements;

-  }

-

-  public Attribute[] getElements() {

-    return elements;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class ConfigurationElement extends Attribute {
+
+	private Attribute[] elements = new Attribute[0];
+
+	public void setElements(Attribute[] elements) {
+		if (elements == null)
+			throw new IllegalArgumentException();
+
+		this.elements = elements;
+	}
+
+	public Attribute[] getElements() {
+		return elements;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Extension.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Extension.java
index 04035a5..6c987a5 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Extension.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Extension.java
@@ -1,131 +1,124 @@
-/*******************************************************************************

- * Copyright (c) 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class Extension extends ModelObject {

-

-  private String namespaceIdentifier;

-  private String label;

-  private String extensionPointUniqueIdentifier;

-  private ConfigurationElement[] configurationElements = new ConfigurationElement[ 0 ];

-  private Long contributor;

-

-  public void setNamespaceIdentifier( String namespaceIdentifier ) {

-    this.namespaceIdentifier = namespaceIdentifier;

-  }

-

-  public void setLabel( String label ) {

-    this.label = label;

-  }

-

-  public void setExtensionPointUniqueIdentifier( String extensionPointUniqueIdentifier ) {

-    this.extensionPointUniqueIdentifier = extensionPointUniqueIdentifier;

-  }

-

-  public void setConfigurationElements( ConfigurationElement[] configurationElements ) {

-    if( configurationElements == null )

-      throw new IllegalArgumentException();

-    this.configurationElements = configurationElements;

-  }

-

-  public void setContributor( Long contributor ) {

-    this.contributor = contributor;

-  }

-

-  public ConfigurationElement[] getConfigurationElements() {

-    return configurationElements;

-  }

-

-  public String getExtensionPointUniqueIdentifier() {

-    return extensionPointUniqueIdentifier;

-  }

-

-  public String getLabel() {

-    return label;

-  }

-

-  public String getNamespaceIdentifier() {

-    return namespaceIdentifier;

-  }

-

-  /**

-   * @return contributor id or <code>null</code> if contributor not present

-   */

-  public Long getContributorId() {

-    return contributor;

-  }

-

-  public boolean equals( Object obj ) {

-    if( this == obj )

-      return true;

-    if( obj == null )

-      return false;

-    if( getClass() != obj.getClass() )

-      return false;

-    Extension other = ( Extension )obj;

-    if( contributor == null ) {

-      if( other.contributor != null )

-        return false;

-    } else if( !contributor.equals( other.contributor ) )

-      return false;

-    if( extensionPointUniqueIdentifier == null ) {

-      if( other.extensionPointUniqueIdentifier != null )

-        return false;

-    } else if( !extensionPointUniqueIdentifier.equals( other.extensionPointUniqueIdentifier ) )

-      return false;

-    if( label == null ) {

-      if( other.label != null )

-        return false;

-    } else if( !label.equals( other.label ) )

-      return false;

-    if( namespaceIdentifier == null ) {

-      if( other.namespaceIdentifier != null )

-        return false;

-    } else if( !namespaceIdentifier.equals( other.namespaceIdentifier ) )

-      return false;

-    return true;

-  }

-

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + ( ( contributor == null )

-                                                       ? 0

-                                                       : contributor.hashCode() );

-    result = prime

-             * result

-             + ( ( extensionPointUniqueIdentifier == null )

-                                                           ? 0

-                                                           : extensionPointUniqueIdentifier.hashCode() );

-    result = prime * result + ( ( label == null )

-                                                 ? 0

-                                                 : label.hashCode() );

-    result = prime * result + ( ( namespaceIdentifier == null )

-                                                               ? 0

-                                                               : namespaceIdentifier.hashCode() );

-    return result;

-  }

-

-  public ExtensionPoint getExtensionPoint() {

-    if( model == null )

-      return null;

-    return model.getExtensionPoint( extensionPointUniqueIdentifier );

-  }

-

-  /**

-   * @return contributor or <code>null</code> if contributor not present

-   */

-  public Bundle getContributor() {

-    if( model == null || contributor == null )

-      return null;

-    return model.getBundle( contributor );

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class Extension extends ModelObject {
+
+	private String namespaceIdentifier;
+	private String label;
+	private String extensionPointUniqueIdentifier;
+	private ConfigurationElement[] configurationElements = new ConfigurationElement[0];
+	private Long contributor;
+
+	public void setNamespaceIdentifier(String namespaceIdentifier) {
+		this.namespaceIdentifier = namespaceIdentifier;
+	}
+
+	public void setLabel(String label) {
+		this.label = label;
+	}
+
+	public void setExtensionPointUniqueIdentifier(String extensionPointUniqueIdentifier) {
+		this.extensionPointUniqueIdentifier = extensionPointUniqueIdentifier;
+	}
+
+	public void setConfigurationElements(ConfigurationElement[] configurationElements) {
+		if (configurationElements == null)
+			throw new IllegalArgumentException();
+
+		this.configurationElements = configurationElements;
+	}
+
+	public void setContributor(Long contributor) {
+		this.contributor = contributor;
+	}
+
+	public ConfigurationElement[] getConfigurationElements() {
+		return configurationElements;
+	}
+
+	public String getExtensionPointUniqueIdentifier() {
+		return extensionPointUniqueIdentifier;
+	}
+
+	public String getLabel() {
+		return label;
+	}
+
+	public String getNamespaceIdentifier() {
+		return namespaceIdentifier;
+	}
+
+	/**
+	 * @return contributor id or <code>null</code> if contributor not present
+	 */
+	public Long getContributorId() {
+		return contributor;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		Extension other = (Extension) obj;
+		if (contributor == null) {
+			if (other.contributor != null)
+				return false;
+		} else if (!contributor.equals(other.contributor))
+			return false;
+		if (extensionPointUniqueIdentifier == null) {
+			if (other.extensionPointUniqueIdentifier != null)
+				return false;
+		} else if (!extensionPointUniqueIdentifier.equals(other.extensionPointUniqueIdentifier))
+			return false;
+		if (label == null) {
+			if (other.label != null)
+				return false;
+		} else if (!label.equals(other.label))
+			return false;
+		if (namespaceIdentifier == null) {
+			if (other.namespaceIdentifier != null)
+				return false;
+		} else if (!namespaceIdentifier.equals(other.namespaceIdentifier))
+			return false;
+		return true;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((contributor == null) ? 0 : contributor.hashCode());
+		result = prime * result + ((extensionPointUniqueIdentifier == null) ? 0 : extensionPointUniqueIdentifier.hashCode());
+		result = prime * result + ((label == null) ? 0 : label.hashCode());
+		result = prime * result + ((namespaceIdentifier == null) ? 0 : namespaceIdentifier.hashCode());
+		return result;
+	}
+
+	public ExtensionPoint getExtensionPoint() {
+		if (model == null)
+			return null;
+		return model.getExtensionPoint(extensionPointUniqueIdentifier);
+	}
+
+	/**
+	 * @return contributor or <code>null</code> if contributor not present
+	 */
+	public Bundle getContributor() {
+		if (model == null || contributor == null)
+			return null;
+		return model.getBundle(contributor);
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ExtensionPoint.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ExtensionPoint.java
index ca26d9a..f02f9e7 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ExtensionPoint.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ExtensionPoint.java
@@ -1,101 +1,100 @@
-/*******************************************************************************

- * Copyright (c) 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import java.util.ArrayList;

-import java.util.List;

-

-

-public class ExtensionPoint extends ModelObject {

-

-  private String label;

-  private String uniqueIdentifier;

-  private String namespaceIdentifier;

-  private Long contributor;

-  private List extensions = new ArrayList();

-

-  public void setLabel( String label ) {

-    this.label = label;

-  }

-

-  public void setUniqueIdentifier( String uniqueIdentifier ) {

-    this.uniqueIdentifier = uniqueIdentifier;

-  }

-

-  public void setNamespaceIdentifier( String namespaceIdentifier ) {

-    this.namespaceIdentifier = namespaceIdentifier;

-  }

-

-  public void setContributor( Long contributor ) {

-    this.contributor = contributor;

-  }

-

-  public void setExtensions( List extensions ) {

-    this.extensions = extensions;

-  }

-

-  public List getExtensions() {

-    return extensions;

-  }

-

-  public String getLabel() {

-    return label;

-  }

-

-  public String getUniqueIdentifier() {

-    return uniqueIdentifier;

-  }

-

-  public String getNamespaceIdentifier() {

-    return namespaceIdentifier;

-  }

-

-  /**

-   * @return contributor id or <code>null</code> if contributor not present

-   */

-  public Long getContributorId() {

-    return contributor;

-  }

-

-  /**

-   * @return contributor or <code>null</code> if contributor not present

-   */

-  public Bundle getContributor() {

-    if( model == null || contributor == null )

-      return null;

-    return model.getBundle( contributor );

-  }

-

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + ( ( uniqueIdentifier == null )

-                                                            ? 0

-                                                            : uniqueIdentifier.hashCode() );

-    return result;

-  }

-

-  public boolean equals( Object obj ) {

-    if( this == obj )

-      return true;

-    if( obj == null )

-      return false;

-    if( getClass() != obj.getClass() )

-      return false;

-    ExtensionPoint other = ( ExtensionPoint )obj;

-    if( uniqueIdentifier == null ) {

-      if( other.uniqueIdentifier != null )

-        return false;

-    } else if( !uniqueIdentifier.equals( other.uniqueIdentifier ) )

-      return false;

-    return true;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class ExtensionPoint extends ModelObject {
+
+	private String label;
+	private String uniqueIdentifier;
+	private String namespaceIdentifier;
+	private Long contributor;
+	private List extensions = new ArrayList();
+
+	public void setLabel(String label) {
+		this.label = label;
+	}
+
+	public void setUniqueIdentifier(String uniqueIdentifier) {
+		this.uniqueIdentifier = uniqueIdentifier;
+	}
+
+	public void setNamespaceIdentifier(String namespaceIdentifier) {
+		this.namespaceIdentifier = namespaceIdentifier;
+	}
+
+	public void setContributor(Long contributor) {
+		this.contributor = contributor;
+	}
+
+	public void setExtensions(List extensions) {
+		this.extensions = extensions;
+	}
+
+	public List getExtensions() {
+		return extensions;
+	}
+
+	public String getLabel() {
+		return label;
+	}
+
+	public String getUniqueIdentifier() {
+		return uniqueIdentifier;
+	}
+
+	public String getNamespaceIdentifier() {
+		return namespaceIdentifier;
+	}
+
+	/**
+	 * @return contributor id or <code>null</code> if contributor not present
+	 */
+	public Long getContributorId() {
+		return contributor;
+	}
+
+	/**
+	 * @return contributor or <code>null</code> if contributor not present
+	 */
+	public Bundle getContributor() {
+		if (model == null || contributor == null)
+			return null;
+		return model.getBundle(contributor);
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((uniqueIdentifier == null) ? 0 : uniqueIdentifier.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		ExtensionPoint other = (ExtensionPoint) obj;
+		if (uniqueIdentifier == null) {
+			if (other.uniqueIdentifier != null)
+				return false;
+		} else if (!uniqueIdentifier.equals(other.uniqueIdentifier))
+			return false;
+		return true;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Folder.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Folder.java
index 14638e9..fbd575b 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Folder.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Folder.java
@@ -1,83 +1,85 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public class Folder {

-

-  public static final int F_EXTENSIONS = 1;

-  public static final int F_EXTENSION_POINTS = 2;

-  public static final int F_IMPORTS = 3;

-  public static final int F_LIBRARIES = 4;

-  public static final int F_REGISTERED_SERVICES = 5;

-  public static final int F_SERVICES_IN_USE = 6;

-  public static final int F_PROPERTIES = 7;

-  public static final int F_USING_BUNDLES = 8;

-  public static final int F_FRAGMENTS = 9;

-  public static final int F_IMPORTED_PACKAGES = 10;

-  public static final int F_EXPORTED_PACKAGES = 11;

-  private int id;

-  private Object parent;

-

-  public Folder( int id, Object parent ) {

-    this.id = id;

-    this.parent = parent;

-  }

-

-  public int getId() {

-    return id;

-  }

-

-  public Object getParent() {

-    return parent;

-  }

-

-  public ModelObject[] getChildren() {

-    switch( id ) {

-      case F_EXTENSION_POINTS:

-        return ( ( Bundle )parent ).getExtensionPoints();

-      case F_EXTENSIONS:

-        return ( ( Bundle )parent ).getExtensions();

-      case F_IMPORTS:

-        return ( ( Bundle )parent ).getImports();

-      case F_LIBRARIES:

-        return ( ( Bundle )parent ).getLibraries();

-      case F_REGISTERED_SERVICES:

-        return ( ( Bundle )parent ).getRegisteredServices();

-      case F_SERVICES_IN_USE:

-        return ( ( Bundle )parent ).getServicesInUse();

-      case F_PROPERTIES:

-        return ( ( ServiceRegistration )parent ).getProperties();

-      case F_USING_BUNDLES:

-        return ( ( ServiceRegistration )parent ).getUsingBundles();

-      case F_FRAGMENTS:

-        return ( ( Bundle )parent ).getFragments();

-      case F_IMPORTED_PACKAGES:

-        return ( ( Bundle )parent ).getImportedPackages();

-      case F_EXPORTED_PACKAGES:

-        return ( ( Bundle )parent ).getExportedPackages();

-    }

-    return null;

-  }

-

-  public int hashCode() {

-    final int prime = 31;

-    int result = 1;

-    result = prime * result + id;

-    result = prime * result + ( ( parent == null )

-                                                  ? 0

-                                                  : parent.hashCode() );

-    return result;

-  }

-

-  public boolean equals( Object obj ) {

-    return( ( obj instanceof Folder ) && ( ( ( Folder )obj ).id == id ) && ( ( ( Folder )obj ).parent.equals( parent ) ) );

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public class Folder {
+
+	public static final int F_EXTENSIONS = 1;
+	public static final int F_EXTENSION_POINTS = 2;
+	public static final int F_IMPORTS = 3;
+	public static final int F_LIBRARIES = 4;
+	public static final int F_REGISTERED_SERVICES = 5;
+	public static final int F_SERVICES_IN_USE = 6;
+	public static final int F_PROPERTIES = 7;
+	public static final int F_USING_BUNDLES = 8;
+	public static final int F_FRAGMENTS = 9;
+	public static final int F_IMPORTED_PACKAGES = 10;
+	public static final int F_EXPORTED_PACKAGES = 11;
+
+	private int id;
+	private Object parent;
+
+	public Folder(int id, Object parent) {
+		this.id = id;
+		this.parent = parent;
+	}
+
+	public int getId() {
+		return id;
+	}
+
+	public Object getParent() {
+		return parent;
+	}
+
+	public ModelObject[] getChildren() {
+		switch (id) {
+			case F_EXTENSION_POINTS :
+				return ((Bundle) parent).getExtensionPoints();
+			case F_EXTENSIONS :
+				return ((Bundle) parent).getExtensions();
+			case F_IMPORTS :
+				return ((Bundle) parent).getImports();
+			case F_LIBRARIES :
+				return ((Bundle) parent).getLibraries();
+			case F_REGISTERED_SERVICES :
+				return ((Bundle) parent).getRegisteredServices();
+			case F_SERVICES_IN_USE :
+				return ((Bundle) parent).getServicesInUse();
+			case F_PROPERTIES :
+				return ((ServiceRegistration) parent).getProperties();
+			case F_USING_BUNDLES :
+				return ((ServiceRegistration) parent).getUsingBundles();
+			case F_FRAGMENTS :
+				return ((Bundle) parent).getFragments();
+			case F_IMPORTED_PACKAGES :
+				return ((Bundle) parent).getImportedPackages();
+			case F_EXPORTED_PACKAGES :
+				return ((Bundle) parent).getExportedPackages();
+		}
+
+		return null;
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + id;
+		result = prime * result + ((parent == null) ? 0 : parent.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		return ((obj instanceof Folder) && (((Folder) obj).id == id) && (((Folder) obj).parent.equals(parent)));
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
index dde9b18..7523483 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/LocalRegistryBackend.java
@@ -8,6 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Wolfgang Schell <ws@jetztgrad.net> - bug 259348
+ *     Arnaud Mergey <a_mergey@yahoo.fr>
  *******************************************************************************/
 package org.eclipse.pde.internal.runtime.registry.model;
 
@@ -28,14 +29,12 @@
 
   private BackendChangeListener listener;
 
+  @Override
   public void setRegistryListener( BackendChangeListener listener ) {
     this.listener = listener;
   }
 
-  /*
-   * (non-Javadoc)
-   * @see org.eclipse.pde.internal.runtime.registry.model.local.RegistryBackend#connect()
-   */
+  @Override
   public void connect( IProgressMonitor monitor ) {
     if( monitor.isCanceled() )
       return;
@@ -44,10 +43,7 @@
     PDERuntimePlugin.getDefault().getBundleContext().addServiceListener( this );
   }
 
-  /*
-   * (non-Javadoc)
-   * @see org.eclipse.pde.internal.runtime.registry.model.local.RegistryBackend#disconnect()
-   */
+  @Override
   public void disconnect() {
     Platform.getExtensionRegistry().removeListener( this );
     PDERuntimePlugin.getDefault().getBundleContext().removeBundleListener( this );
@@ -60,38 +56,24 @@
     return bundle.equals( ref.getBundle() );
   }
 
-  protected static boolean isServiceInUse( org.osgi.framework.Bundle bundle, ServiceReference ref )
+  protected static boolean isServiceInUse( org.osgi.framework.Bundle bundle,
+                                           ServiceReference ref )
   {
     org.osgi.framework.Bundle[] usingBundles = ref.getUsingBundles();
     return( usingBundles != null && Arrays.asList( usingBundles ).contains( bundle ) );
   }
 
-  /*
-   * (non-Javadoc)
-   * @see
-   * org.eclipse.pde.internal.runtime.registry.model.local.RegistryBackend#start(org.osgi.framework
-   * .Bundle)
-   */
+  @Override
   public void start( long id ) throws BundleException {
     PDERuntimePlugin.getDefault().getBundleContext().getBundle( id ).start();
   }
 
-  /*
-   * (non-Javadoc)
-   * @see
-   * org.eclipse.pde.internal.runtime.registry.model.local.RegistryBackend#stop(org.osgi.framework
-   * .Bundle)
-   */
+  @Override
   public void stop( long id ) throws BundleException {
     PDERuntimePlugin.getDefault().getBundleContext().getBundle( id ).stop();
   }
 
-  /*
-   * (non-Javadoc)
-   * @see
-   * org.eclipse.pde.internal.runtime.registry.model.local.RegistryBackend#diagnose(org.osgi.framework
-   * .Bundle)
-   */
+  @Override
   public MultiStatus diagnose( long id ) {
     PlatformAdmin plaformAdmin = PDERuntimePlugin.getDefault().getPlatformAdmin();
     State state = plaformAdmin.getState( false );
@@ -105,9 +87,11 @@
                                             PDERuntimeMessages.get().RegistryView_found_problems,
                                             null );
     for( int i = 0; i < resolverErrors.length; i++ ) {
-      if( ( resolverErrors[ i ].getType() & ( ResolverError.MISSING_FRAGMENT_HOST
-                                              | ResolverError.MISSING_GENERIC_CAPABILITY
-                                              | ResolverError.MISSING_IMPORT_PACKAGE | ResolverError.MISSING_REQUIRE_BUNDLE ) ) != 0 )
+      if( ( resolverErrors[ i ].getType()
+            & ( ResolverError.MISSING_FRAGMENT_HOST
+                | ResolverError.MISSING_GENERIC_CAPABILITY
+                | ResolverError.MISSING_IMPORT_PACKAGE
+                | ResolverError.MISSING_REQUIRE_BUNDLE ) ) != 0 )
         continue;
       IStatus status = new Status( IStatus.WARNING,
                                    PDERuntimePlugin.ID,
@@ -123,6 +107,7 @@
     return problems;
   }
 
+  @Override
   public void initializeBundles( IProgressMonitor monitor ) {
     if( monitor.isCanceled() )
       return;
@@ -137,6 +122,7 @@
     }
   }
 
+  @Override
   public void initializeExtensionPoints( IProgressMonitor monitor ) {
     if( monitor.isCanceled() )
       return;
@@ -150,14 +136,14 @@
     listener.addExtensionPoints( extPts );
   }
 
+  @Override
   public void initializeServices( IProgressMonitor monitor ) {
     if( monitor.isCanceled() )
       return;
     ServiceReference[] references = null;
     try {
-      references = PDERuntimePlugin.getDefault()
-        .getBundleContext()
-        .getAllServiceReferences( null, null );
+      references = PDERuntimePlugin.getDefault().getBundleContext().getAllServiceReferences( null,
+                                                                                             null );
     } catch( InvalidSyntaxException e ) { // nothing
     }
     if( references == null ) {
@@ -168,7 +154,7 @@
         return;
       ServiceRegistration service = createServiceReferenceAdapter( references[ i ] );
       // The list of registered services is volatile, avoid adding unregistered services to the
-// listener
+      // listener
       if( service.getBundle() != null ) {
         listener.addService( service );
       }
@@ -252,8 +238,8 @@
       .getState( false )
       .getBundle( name, null );
     return descr == null
-                        ? null
-                        : new Long( descr.getBundleId() );
+                         ? null
+                         : new Long( descr.getBundleId() );
   }
 
   private ExtensionPoint createExtensionPointAdapter( IExtensionPoint extensionPoint ) {
@@ -270,13 +256,14 @@
   /**
    * Returns a new {@link ServiceRegistration} for the given service reference. If the service being
    * referenced is unregistered, the returned service registration will not have a bundle set.
-   * 
+   *
    * @param ref the service reference to get the registration for
    * @return a new service registration containing information from the service reference
    */
   private ServiceRegistration createServiceReferenceAdapter( ServiceReference ref ) {
     ServiceRegistration service = new ServiceRegistration();
-    service.setId( ( ( Long )ref.getProperty( org.osgi.framework.Constants.SERVICE_ID ) ).longValue() );
+    service
+      .setId( ( ( Long )ref.getProperty( org.osgi.framework.Constants.SERVICE_ID ) ).longValue() );
     org.osgi.framework.Bundle bundle = ref.getBundle();
     if( bundle != null ) {
       service.setBundle( bundle.getSymbolicName() );
@@ -403,8 +390,8 @@
     if( label == null && config.getAttribute( "id" ) != null ) { //$NON-NLS-1$
       String[] labelSplit = config.getAttribute( "id" ).split( "\\." ); //$NON-NLS-1$ //$NON-NLS-2$
       label = labelSplit.length == 0
-                                    ? null
-                                    : labelSplit[ labelSplit.length - 1 ];
+                                     ? null
+                                     : labelSplit[ labelSplit.length - 1 ];
     }
     return label;
   }
@@ -417,6 +404,7 @@
     return extensionAdapters;
   }
 
+  @Override
   public void bundleChanged( BundleEvent event ) {
     Bundle adapter = createBundleAdapter( event.getBundle() );
     switch( event.getType() ) {
@@ -452,6 +440,7 @@
     }
   }
 
+  @Override
   public void serviceChanged( ServiceEvent event ) {
     ServiceReference ref = event.getServiceReference();
     ServiceRegistration adapter = createServiceReferenceAdapter( ref );
@@ -477,22 +466,27 @@
     return result;
   }
 
+  @Override
   public void added( IExtension[] extensions ) {
     listener.addExtensions( createExtensionAdapters( extensions ) );
   }
 
+  @Override
   public void removed( IExtension[] extensions ) {
     listener.removeExtensions( createExtensionAdapters( extensions ) );
   }
 
+  @Override
   public void added( IExtensionPoint[] extensionPoints ) {
     listener.addExtensionPoints( createExtensionPointAdapters( extensionPoints ) );
   }
 
+  @Override
   public void removed( IExtensionPoint[] extensionPoints ) {
     listener.removeExtensionPoints( createExtensionPointAdapters( extensionPoints ) );
   }
 
+  @Override
   public void setEnabled( long id, boolean enabled ) {
     State state = PDERuntimePlugin.getDefault().getState();
     BundleDescription desc = state.getBundle( id );
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeDelta.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeDelta.java
index 2a80255..2156b91 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeDelta.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeDelta.java
@@ -1,42 +1,43 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-/**

- * Delta model objects are of type IBundle, IService, IExtension, IExtensionPoint

- */

-public class ModelChangeDelta {

-

-  public static final int ADDED = 0;

-  public static final int UPDATED = 1;

-  public static final int REMOVED = 2;

-  public static final int STARTING = 3;

-  public static final int STARTED = 4;

-  public static final int STOPPING = 5;

-  public static final int STOPPED = 6;

-  public static final int RESOLVED = 7;

-  public static final int UNRESOLVED = 8;

-  private ModelObject fObject;

-  private int fFlag;

-

-  public ModelChangeDelta( ModelObject object, int flag ) {

-    fObject = object;

-    fFlag = flag;

-  }

-

-  public ModelObject getModelObject() {

-    return fObject;

-  }

-

-  public int getFlag() {

-    return fFlag;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+/**
+ * Delta model objects are of type IBundle, IService, IExtension, IExtensionPoint
+ */
+public class ModelChangeDelta {
+
+	public static final int ADDED = 0;
+	public static final int UPDATED = 1;
+	public static final int REMOVED = 2;
+	public static final int STARTING = 3;
+	public static final int STARTED = 4;
+	public static final int STOPPING = 5;
+	public static final int STOPPED = 6;
+	public static final int RESOLVED = 7;
+	public static final int UNRESOLVED = 8;
+
+	private ModelObject fObject;
+	private int fFlag;
+
+	public ModelChangeDelta(ModelObject object, int flag) {
+		fObject = object;
+		fFlag = flag;
+	}
+
+	public ModelObject getModelObject() {
+		return fObject;
+	}
+
+	public int getFlag() {
+		return fFlag;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeListener.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeListener.java
index 16bf3ac..acd483a 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeListener.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelChangeListener.java
@@ -1,21 +1,22 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-/**

- * Event provides a list of objects that have changed. Possible objects on the list are IBundle,

- * IService, IExtension, IExtensionPoint. This is temporary solution and is subject to future

- * changes.

- */

-public interface ModelChangeListener {

-

-  void modelChanged( ModelChangeDelta[] deltas );

-}

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+/**
+ * Event provides a list of objects that have changed.
+ * Possible objects on the list are IBundle, IService, IExtension, IExtensionPoint.
+ *
+ * This is temporary solution and is subject to future changes.
+ */
+public interface ModelChangeListener {
+
+	void modelChanged(ModelChangeDelta[] deltas);
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelObject.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelObject.java
index 7ceb962..53337f7 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelObject.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ModelObject.java
@@ -1,23 +1,23 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2011 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-public abstract class ModelObject {

-

-  /**

-   * The registry model, possibly <code>null</code>

-   */

-  protected RegistryModel model;

-

-  public void setModel( RegistryModel model ) {

-    this.model = model;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2011 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+public abstract class ModelObject {
+
+	/**
+	 * The registry model, possibly <code>null</code>
+	 */
+	protected RegistryModel model;
+
+	public void setModel(RegistryModel model) {
+		this.model = model;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Property.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Property.java
index dd49a50..51908cc 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Property.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/Property.java
@@ -1,120 +1,135 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Wolfgang Schell <ws@jetztgrad.net> - bug 260055

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import org.osgi.framework.Constants;

-

-

-public class Property extends ModelObject implements Comparable {

-

-  public static final String PREFIX_SERVICE = "service."; //$NON-NLS-1$

-  public static final String PREFIX_COMPONENT = "component."; //$NON-NLS-1$

-  private String name;

-  private String value;

-

-  public Property() {

-    // empty

-  }

-

-  // TODO should we merge this with Attribute somehow?

-  public Property( String name, String value ) {

-    this.name = name;

-    this.value = value;

-  }

-

-  public String getValue() {

-    return value;

-  }

-

-  public String getName() {

-    return name;

-  }

-

-  public void setName( String name ) {

-    this.name = name;

-  }

-

-  public void setValue( String value ) {

-    this.value = value;

-  }

-

-  /**

-   * Compare properties for order. Returns a negative integer, zero, or a positive integer as the

-   * first argument is less than, equal to, or greater than the second.

-   * <p>

-   * The {@link Property}s are compared according to the following rules:

-   * <ul>

-   * <li>objectClass is always less than everything else</li>

-   * <li>properties with names starting with "service." are considered "less" than other properties.

-   * </li>

-   * <li>regular properties are considered "more" than other properties</li>

-   * </ul>

-   * </p>

-   * <p>

-   * When sorting an array of properties with the following code:

-   * 

-   * <pre>

-   * Property[] properties = ...;

-   * Arrays.sort(properties, PropertyComparator.INSTANCE);

-   * </pre>

-   * 

-   * the result is something like this:

-   * <ul>

-   * <li>objectClass</li>

-   * <li>service.id</li>

-   * <li>service.id</li>

-   * </ul>

-   * </p>

-   * 

-   * @param obj other property to be compared against

-   * @return a negative integer, zero, or a positive integer as the first argument is less than,

-   *         equal to, or greater than the second.

-   */

-  public int compareTo( Object obj ) {

-    if( !( obj instanceof Property ) ) {

-      return 0;

-    }

-    Property other = ( Property )obj;

-    String name0 = getName();

-    String name1 = other.getName();

-    if( Constants.OBJECTCLASS.equals( name0 ) ) {

-      return -1;

-    }

-    if( Constants.OBJECTCLASS.equals( name1 ) ) {

-      return 1;

-    }

-    if( name0.startsWith( PREFIX_COMPONENT ) && name1.startsWith( PREFIX_COMPONENT ) ) {

-      // both are service properties

-      // simply compare them

-      return name0.compareTo( name1 );

-    }

-    if( name0.startsWith( PREFIX_COMPONENT ) ) {

-      return -1;

-    }

-    if( name1.startsWith( PREFIX_COMPONENT ) ) {

-      return 1;

-    }

-    if( name0.startsWith( PREFIX_SERVICE ) && name1.startsWith( PREFIX_SERVICE ) ) {

-      // both are service properties

-      // simply compare them

-      return name0.compareTo( name1 );

-    }

-    if( name0.startsWith( PREFIX_SERVICE ) ) {

-      return -1;

-    }

-    if( name1.startsWith( PREFIX_SERVICE ) ) {

-      return 1;

-    }

-    // simply compare strings

-    return name0.compareTo( name1 );

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Wolfgang Schell <ws@jetztgrad.net> - bug 260055
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import org.osgi.framework.Constants;
+
+public class Property extends ModelObject implements Comparable {
+	public static final String PREFIX_SERVICE = "service."; //$NON-NLS-1$
+	public static final String PREFIX_COMPONENT = "component."; //$NON-NLS-1$
+
+	private String name;
+	private String value;
+
+	public Property() {
+		// empty
+	}
+
+	// TODO should we merge this with Attribute somehow?
+	public Property(String name, String value) {
+		this.name = name;
+		this.value = value;
+	}
+
+	public String getValue() {
+		return value;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	public void setValue(String value) {
+		this.value = value;
+	}
+
+	/**
+	 * Compare properties for order. Returns a negative integer, zero, or a positive
+	 * integer as the first argument is less than, equal to, or greater than the second.
+	 *
+	 * <p>
+	 * The {@link Property}s are compared according to the following rules:
+	 * <ul>
+	 * <li>objectClass is always less than everything else</li>
+	 * <li>properties with names starting with "service." are considered "less"
+	 * 		than other properties.</li>
+	 * <li>regular properties are considered "more" than other properties</li>
+	 * </ul>
+	 * </p>
+	 *
+	 * <p>
+	 * When sorting an array of properties with the following code:
+	 *
+	 * <pre>
+	 * Property[] properties = ...;
+	 * Arrays.sort(properties, PropertyComparator.INSTANCE);
+	 * </pre>
+	 *
+	 * the result is something like this:
+	 * <ul>
+	 * <li>objectClass</li>
+	 * <li>service.id</li>
+	 * <li>service.id</li>
+	 * </ul>
+	 * </p>
+	 *
+	 * @param obj other property to be compared against
+	 *
+	 * @return a negative integer, zero, or a positive integer as the first
+	 * 			argument is less than, equal to, or greater than the second.
+	 */
+	@Override
+	public int compareTo(Object obj) {
+		if (!(obj instanceof Property)) {
+			return 0;
+		}
+
+		Property other = (Property) obj;
+
+		String name0 = getName();
+		String name1 = other.getName();
+
+		if (Constants.OBJECTCLASS.equals(name0)) {
+			return -1;
+		}
+
+		if (Constants.OBJECTCLASS.equals(name1)) {
+			return 1;
+		}
+
+		if (name0.startsWith(PREFIX_COMPONENT) && name1.startsWith(PREFIX_COMPONENT)) {
+			// both are service properties
+			// simply compare them
+			return name0.compareTo(name1);
+		}
+
+		if (name0.startsWith(PREFIX_COMPONENT)) {
+			return -1;
+		}
+
+		if (name1.startsWith(PREFIX_COMPONENT)) {
+			return 1;
+		}
+
+		if (name0.startsWith(PREFIX_SERVICE) && name1.startsWith(PREFIX_SERVICE)) {
+			// both are service properties
+			// simply compare them
+			return name0.compareTo(name1);
+		}
+
+		if (name0.startsWith(PREFIX_SERVICE)) {
+			return -1;
+		}
+
+		if (name1.startsWith(PREFIX_SERVICE)) {
+			return 1;
+		}
+
+		// simply compare strings
+		return name0.compareTo(name1);
+	}
+
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryBackend.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryBackend.java
index d75356b..552da20 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryBackend.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryBackend.java
@@ -1,39 +1,39 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.core.runtime.MultiStatus;

-import org.osgi.framework.BundleException;

-

-

-public interface RegistryBackend {

-

-  public void connect( IProgressMonitor monitor );

-

-  public void disconnect();

-

-  public void setEnabled( long id, boolean enabled );

-

-  public void start( long id ) throws BundleException;

-

-  public void stop( long id ) throws BundleException;

-

-  public MultiStatus diagnose( long id );

-

-  public void initializeBundles( IProgressMonitor monitor );

-

-  public void initializeExtensionPoints( IProgressMonitor monitor );

-

-  public void setRegistryListener( BackendChangeListener listener );

-

-  public void initializeServices( IProgressMonitor monitor );

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.MultiStatus;
+import org.osgi.framework.BundleException;
+
+public interface RegistryBackend {
+
+	public void connect(IProgressMonitor monitor);
+
+	public void disconnect();
+
+	public void setEnabled(long id, boolean enabled);
+
+	public void start(long id) throws BundleException;
+
+	public void stop(long id) throws BundleException;
+
+	public MultiStatus diagnose(long id);
+
+	public void initializeBundles(IProgressMonitor monitor);
+
+	public void initializeExtensionPoints(IProgressMonitor monitor);
+
+	public void setRegistryListener(BackendChangeListener listener);
+
+	public void initializeServices(IProgressMonitor monitor);
+
+}
\ No newline at end of file
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
index 03a61ac..8069274 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModel.java
@@ -1,375 +1,408 @@
-/*******************************************************************************

- * Copyright (c) 2008, 20012 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import java.util.*;

-import org.eclipse.core.runtime.IProgressMonitor;

-import org.eclipse.osgi.service.resolver.VersionRange;

-import org.osgi.framework.Version;

-

-

-/**

- * Model entry point for Eclipse runtime. Provides information about runtime bundles, services and

- * extension points.

- */

-public class RegistryModel {

-

-  private BackendChangeListener backendListener = new BackendChangeListener() {

-

-    public void addBundle( Bundle adapter ) {

-      adapter.setModel( RegistryModel.this );

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, ModelChangeDelta.ADDED );

-      bundles.put( new Long( adapter.getId() ), adapter );

-      if( adapter.getFragmentHost() != null ) {

-        addFragment( adapter );

-        Bundle host = getBundle( adapter.getFragmentHost(), adapter.getFragmentHostVersion() );

-        if( host != null ) {

-          ModelChangeDelta d2 = new ModelChangeDelta( host, ModelChangeDelta.UPDATED );

-          fireModelChangeEvent( new ModelChangeDelta[] {

-            delta, d2

-          } );

-          return;

-        }

-      }

-      fireModelChangeEvent( new ModelChangeDelta[] {

-        delta

-      } );

-    }

-

-    public void removeBundle( Bundle adapter ) {

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, ModelChangeDelta.REMOVED );

-      bundles.remove( new Long( adapter.getId() ) );

-      if( adapter.getFragmentHost() != null ) {

-        removeFragment( adapter );

-        Bundle host = getBundle( adapter.getFragmentHost(), adapter.getFragmentHostVersion() );

-        if( host != null ) {

-          ModelChangeDelta d2 = new ModelChangeDelta( host, ModelChangeDelta.UPDATED );

-          fireModelChangeEvent( new ModelChangeDelta[] {

-            delta, d2

-          } );

-          return;

-        }

-      }

-      fireModelChangeEvent( new ModelChangeDelta[] {

-        delta

-      } );

-      adapter.setModel( null );

-    }

-

-    public void updateBundle( Bundle adapter, int updated ) {

-      adapter.setModel( RegistryModel.this );

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, updated );

-      bundles.put( new Long( adapter.getId() ), adapter ); // replace old with new one

-      if( adapter.getFragmentHost() != null ) {

-        addFragment( adapter );

-      }

-      fireModelChangeEvent( new ModelChangeDelta[] {

-        delta

-      } );

-    }

-

-    public void addService( ServiceRegistration adapter ) {

-      ModelChangeDelta serviceNameDelta = null;

-      if( !serviceNames.contains( adapter.getName() ) ) {

-        ServiceName name = adapter.getName();

-        name.setModel( RegistryModel.this );

-        serviceNames.add( name );

-        serviceNameDelta = new ModelChangeDelta( name, ModelChangeDelta.ADDED );

-      }

-      adapter.setModel( RegistryModel.this );

-      services.put( new Long( adapter.getId() ), adapter );

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, ModelChangeDelta.ADDED );

-      if( serviceNameDelta != null ) {

-        fireModelChangeEvent( new ModelChangeDelta[] {

-          serviceNameDelta, delta

-        } );

-      } else {

-        fireModelChangeEvent( new ModelChangeDelta[] {

-          delta

-        } );

-      }

-    }

-

-    public void removeService( ServiceRegistration adapter ) {

-      ModelChangeDelta serviceNameDelta = null;

-      if( getServices( adapter.getName().getClasses() ).length == 0 ) {

-        serviceNames.remove( adapter.getName() );

-        serviceNameDelta = new ModelChangeDelta( adapter.getName(), ModelChangeDelta.REMOVED );

-      }

-      services.remove( new Long( adapter.getId() ) );

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, ModelChangeDelta.REMOVED );

-      if( serviceNameDelta != null ) {

-        fireModelChangeEvent( new ModelChangeDelta[] {

-          serviceNameDelta, delta

-        } );

-        adapter.getName().setModel( null );

-        adapter.setModel( null );

-      } else {

-        fireModelChangeEvent( new ModelChangeDelta[] {

-          delta

-        } );

-        adapter.setModel( null );

-      }

-    }

-

-    public void updateService( ServiceRegistration adapter ) {

-      adapter.setModel( RegistryModel.this );

-      services.put( new Long( adapter.getId() ), adapter );

-      ModelChangeDelta delta = new ModelChangeDelta( adapter, ModelChangeDelta.UPDATED );

-      fireModelChangeEvent( new ModelChangeDelta[] {

-        delta

-      } );

-    }

-

-    public void addExtensions( Extension[] extensionAdapters ) {

-      for( int i = 0; i < extensionAdapters.length; i++ ) {

-        extensionAdapters[ i ].setModel( RegistryModel.this );

-        String id = extensionAdapters[ i ].getExtensionPointUniqueIdentifier();

-        ExtensionPoint extPoint = ( ExtensionPoint )extensionPoints.get( id );

-        extPoint.getExtensions().add( extensionAdapters[ i ] );

-      }

-      ModelChangeDelta[] delta = new ModelChangeDelta[ extensionAdapters.length ];

-      for( int i = 0; i < delta.length; i++ ) {

-        delta[ i ] = new ModelChangeDelta( extensionAdapters[ i ], ModelChangeDelta.ADDED );

-      }

-      fireModelChangeEvent( delta );

-    }

-

-    public void removeExtensions( Extension[] extensionAdapters ) {

-      for( int i = 0; i < extensionAdapters.length; i++ ) {

-        String id = extensionAdapters[ i ].getExtensionPointUniqueIdentifier();

-        ExtensionPoint extPoint = ( ExtensionPoint )extensionPoints.get( id );

-        extPoint.getExtensions().remove( extensionAdapters[ i ] );

-      }

-      ModelChangeDelta[] delta = new ModelChangeDelta[ extensionAdapters.length ];

-      for( int i = 0; i < delta.length; i++ ) {

-        delta[ i ] = new ModelChangeDelta( extensionAdapters[ i ], ModelChangeDelta.REMOVED );

-      }

-      fireModelChangeEvent( delta );

-      for( int i = 0; i < extensionAdapters.length; i++ ) {

-        extensionAdapters[ i ].setModel( null );

-      }

-    }

-

-    public void addExtensionPoints( ExtensionPoint[] extensionPointAdapters ) {

-      for( int i = 0; i < extensionPointAdapters.length; i++ ) {

-        extensionPointAdapters[ i ].setModel( RegistryModel.this );

-        extensionPoints.put( extensionPointAdapters[ i ].getUniqueIdentifier(),

-                             extensionPointAdapters[ i ] );

-      }

-      ModelChangeDelta[] delta = new ModelChangeDelta[ extensionPointAdapters.length ];

-      for( int i = 0; i < delta.length; i++ ) {

-        delta[ i ] = new ModelChangeDelta( extensionPointAdapters[ i ], ModelChangeDelta.ADDED );

-      }

-      fireModelChangeEvent( delta );

-    }

-

-    public void removeExtensionPoints( ExtensionPoint[] extensionPointAdapters ) {

-      for( int i = 0; i < extensionPointAdapters.length; i++ ) {

-        extensionPoints.remove( extensionPointAdapters[ i ].getUniqueIdentifier() );

-      }

-      ModelChangeDelta[] delta = new ModelChangeDelta[ extensionPointAdapters.length ];

-      for( int i = 0; i < delta.length; i++ ) {

-        delta[ i ] = new ModelChangeDelta( extensionPointAdapters[ i ], ModelChangeDelta.REMOVED );

-      }

-      fireModelChangeEvent( delta );

-      for( int i = 0; i < extensionPointAdapters.length; i++ ) {

-        extensionPointAdapters[ i ].setModel( null );

-      }

-    }

-  };

-  private List listeners = new ArrayList();

-  private Map bundles;

-  private Map services;

-  private Map extensionPoints;

-  private Set serviceNames;

-  private Map fragments;

-  protected RegistryBackend backend;

-

-  public RegistryModel( RegistryBackend backend ) {

-    bundles = Collections.synchronizedMap( new HashMap() );

-    services = Collections.synchronizedMap( new HashMap() );

-    extensionPoints = Collections.synchronizedMap( new HashMap() );

-    serviceNames = Collections.synchronizedSet( new HashSet() );

-    fragments = Collections.synchronizedMap( new HashMap() );

-    this.backend = backend;

-    backend.setRegistryListener( backendListener );

-  }

-

-  protected void addFragment( Bundle fragment ) {

-    Set hostFragments = ( Set )fragments.get( fragment.getFragmentHost() );

-    if( hostFragments == null ) {

-      hostFragments = Collections.synchronizedSet( new HashSet() );

-      fragments.put( fragment.getFragmentHost(), hostFragments );

-    }

-    if( !hostFragments.add( fragment ) ) {

-      // not added if element already exists. So remove old and add it again.

-      hostFragments.remove( fragment );

-      hostFragments.add( fragment );

-    }

-  }

-

-  protected void removeFragment( Bundle fragment ) {

-    Set hostFragments = ( Set )fragments.get( fragment.getFragmentHost() );

-    if( hostFragments == null ) {

-      return;

-    }

-    hostFragments.remove( fragment );

-  }

-

-  public void connect( IProgressMonitor monitor, boolean forceInit ) {

-    backend.connect( monitor );

-    if( forceInit ) {

-      initialize( monitor );

-    }

-  }

-

-  public void initialize( IProgressMonitor monitor ) {

-    backend.initializeBundles( monitor );

-    backend.initializeServices( monitor );

-    backend.initializeExtensionPoints( monitor );

-  }

-

-  public void disconnect() {

-    backend.disconnect();

-  }

-

-  public Bundle[] getBundles() {

-    return ( Bundle[] )bundles.values().toArray( new Bundle[ bundles.values().size() ] );

-  }

-

-  public ExtensionPoint[] getExtensionPoints() {

-    return ( ExtensionPoint[] )extensionPoints.values()

-      .toArray( new ExtensionPoint[ extensionPoints.values().size() ] );

-  }

-

-  public ServiceRegistration[] getServices() {

-    return ( ServiceRegistration[] )services.values()

-      .toArray( new ServiceRegistration[ services.values().size() ] );

-  }

-

-  public ServiceName[] getServiceNames() {

-    return ( ServiceName[] )serviceNames.toArray( new ServiceName[ serviceNames.size() ] );

-  }

-

-  public ServiceRegistration[] getServices( String[] classes ) {

-    List result = new ArrayList();

-    synchronized( services ) {

-      for( Iterator i = services.values().iterator(); i.hasNext(); ) {

-        ServiceRegistration sr = ( ServiceRegistration )i.next();

-        if( Arrays.equals( classes, sr.getName().getClasses() ) )

-          result.add( sr );

-      }

-    }

-    return ( ServiceRegistration[] )result.toArray( new ServiceRegistration[ result.size() ] );

-  }

-

-  public void addModelChangeListener( ModelChangeListener listener ) {

-    listeners.add( listener );

-  }

-

-  public void removeModelChangeListener( ModelChangeListener listener ) {

-    listeners.remove( listener );

-  }

-

-  /**

-   * For received domain types: Bundle, IExtension, IExtensionPoint, ServiceReference, generates

-   * delta with model types: IBundle, IExtensionAdapter, IExtensionPointAdapter, IService

-   * 

-   * @param objects

-   */

-  protected void fireModelChangeEvent( ModelChangeDelta[] delta ) {

-    for( Iterator i = listeners.iterator(); i.hasNext(); ) {

-      ModelChangeListener listener = ( ModelChangeListener )i.next();

-      listener.modelChanged( delta );

-    }

-  }

-

-  public Bundle getBundle( Long id ) {

-    return ( Bundle )bundles.get( id );

-  }

-

-  public Bundle getBundle( String symbolicName, String versionRange ) {

-    synchronized( bundles ) {

-      for( Iterator i = bundles.values().iterator(); i.hasNext(); ) {

-        Bundle bundle = ( Bundle )i.next();

-        if( bundle.getSymbolicName().equals( symbolicName ) ) {

-          if( versionMatches( bundle.getVersion(), versionRange ) )

-            return bundle;

-        }

-      }

-    }

-    return null;

-  }

-

-  public ExtensionPoint getExtensionPoint( String extensionPointUniqueIdentifier ) {

-    return ( ExtensionPoint )extensionPoints.get( extensionPointUniqueIdentifier );

-  }

-

-  public Bundle[] getFragments( Bundle bundle ) {

-    Set set = ( Set )fragments.get( bundle.getSymbolicName() );

-    if( set == null )

-      return new Bundle[ 0 ];

-    List result = new ArrayList( set.size() );

-    Version hostVersion = Version.parseVersion( bundle.getVersion() );

-    for( Iterator i = set.iterator(); i.hasNext(); ) {

-      Bundle fragment = ( Bundle )i.next();

-      String fragmentVersionOrRange = fragment.getFragmentHostVersion();

-      if( versionMatches( hostVersion, fragmentVersionOrRange ) )

-        result.add( fragment );

-    }

-    return ( Bundle[] )result.toArray( new Bundle[ result.size() ] );

-  }

-

-  private boolean versionMatches( String hostVersion, String versionOrRange ) {

-    try {

-      Version version = Version.parseVersion( hostVersion );

-      return versionMatches( version, versionOrRange );

-    } catch( IllegalArgumentException e ) {

-      // ignore

-    }

-    return false;

-  }

-

-  /**

-   * Check if hostVersion is greater or equal fragmentVersion, or is included in fragment version

-   * range

-   * 

-   * @param hostVersion Version

-   * @param versionOrRange Version or VersionRange

-   * @return true if matches, false otherwise

-   */

-  private boolean versionMatches( Version hostVersion, String versionOrRange ) {

-    if( versionOrRange == null ) {

-      return true;

-    }

-    try {

-      Version version = Version.parseVersion( versionOrRange );

-      if( hostVersion.compareTo( version ) >= 0 )

-        return true;

-    } catch( IllegalArgumentException e ) {

-      // wrong formatting, try VersionRange

-    }

-    try {

-      VersionRange range = new VersionRange( versionOrRange );

-      if( range.isIncluded( hostVersion ) )

-        return true;

-    } catch( IllegalArgumentException e2 ) {

-      // wrong range formatting

-    }

-    return false;

-  }

-  /*

-   * void setEnabled(Bundle bundle, boolean enabled); void start(Bundle bundle) throws

-   * BundleException; // XXX Create custom Exception void stop(Bundle bundle) throws

-   * BundleException; MultiStatus diagnose(Bundle bundle);

-   */

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2012 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import java.util.*;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.osgi.service.resolver.VersionRange;
+import org.osgi.framework.Version;
+
+/**
+ * Model entry point for Eclipse runtime. Provides information about runtime bundles, services and extension points.
+ */
+public class RegistryModel {
+
+	private BackendChangeListener backendListener = new BackendChangeListener() {
+		@Override
+		public void addBundle(Bundle adapter) {
+			adapter.setModel(RegistryModel.this);
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, ModelChangeDelta.ADDED);
+
+			bundles.put(new Long(adapter.getId()), adapter);
+
+			if (adapter.getFragmentHost() != null) {
+				addFragment(adapter);
+
+				Bundle host = getBundle(adapter.getFragmentHost(), adapter.getFragmentHostVersion());
+				if (host != null) {
+					ModelChangeDelta d2 = new ModelChangeDelta(host, ModelChangeDelta.UPDATED);
+					fireModelChangeEvent(new ModelChangeDelta[] {delta, d2});
+					return;
+				}
+			}
+
+			fireModelChangeEvent(new ModelChangeDelta[] {delta});
+		}
+
+		@Override
+		public void removeBundle(Bundle adapter) {
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, ModelChangeDelta.REMOVED);
+
+			bundles.remove(new Long(adapter.getId()));
+
+			if (adapter.getFragmentHost() != null) {
+				removeFragment(adapter);
+
+				Bundle host = getBundle(adapter.getFragmentHost(), adapter.getFragmentHostVersion());
+				if (host != null) {
+					ModelChangeDelta d2 = new ModelChangeDelta(host, ModelChangeDelta.UPDATED);
+					fireModelChangeEvent(new ModelChangeDelta[] {delta, d2});
+					return;
+				}
+			}
+
+			fireModelChangeEvent(new ModelChangeDelta[] {delta});
+			adapter.setModel(null);
+		}
+
+		@Override
+		public void updateBundle(Bundle adapter, int updated) {
+			adapter.setModel(RegistryModel.this);
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, updated);
+
+			bundles.put(new Long(adapter.getId()), adapter); // replace old with new one
+
+			if (adapter.getFragmentHost() != null) {
+				addFragment(adapter);
+			}
+
+			fireModelChangeEvent(new ModelChangeDelta[] {delta});
+		}
+
+		@Override
+		public void addService(ServiceRegistration adapter) {
+			ModelChangeDelta serviceNameDelta = null;
+			if (!serviceNames.contains(adapter.getName())) {
+				ServiceName name = adapter.getName();
+				name.setModel(RegistryModel.this);
+
+				serviceNames.add(name);
+
+				serviceNameDelta = new ModelChangeDelta(name, ModelChangeDelta.ADDED);
+			}
+
+			adapter.setModel(RegistryModel.this);
+			services.put(new Long(adapter.getId()), adapter);
+
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, ModelChangeDelta.ADDED);
+
+			if (serviceNameDelta != null) {
+				fireModelChangeEvent(new ModelChangeDelta[] {serviceNameDelta, delta});
+			} else {
+				fireModelChangeEvent(new ModelChangeDelta[] {delta});
+			}
+		}
+
+		@Override
+		public void removeService(ServiceRegistration adapter) {
+			ModelChangeDelta serviceNameDelta = null;
+			if (getServices(adapter.getName().getClasses()).length == 0) {
+				serviceNames.remove(adapter.getName());
+				serviceNameDelta = new ModelChangeDelta(adapter.getName(), ModelChangeDelta.REMOVED);
+			}
+
+			services.remove(new Long(adapter.getId()));
+
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, ModelChangeDelta.REMOVED);
+
+			if (serviceNameDelta != null) {
+				fireModelChangeEvent(new ModelChangeDelta[] {serviceNameDelta, delta});
+				adapter.getName().setModel(null);
+				adapter.setModel(null);
+			} else {
+				fireModelChangeEvent(new ModelChangeDelta[] {delta});
+				adapter.setModel(null);
+			}
+		}
+
+		@Override
+		public void updateService(ServiceRegistration adapter) {
+			adapter.setModel(RegistryModel.this);
+			services.put(new Long(adapter.getId()), adapter);
+
+			ModelChangeDelta delta = new ModelChangeDelta(adapter, ModelChangeDelta.UPDATED);
+
+			fireModelChangeEvent(new ModelChangeDelta[] {delta});
+		}
+
+		@Override
+		public void addExtensions(Extension[] extensionAdapters) {
+			for (int i = 0; i < extensionAdapters.length; i++) {
+				extensionAdapters[i].setModel(RegistryModel.this);
+				String id = extensionAdapters[i].getExtensionPointUniqueIdentifier();
+				ExtensionPoint extPoint = (ExtensionPoint) extensionPoints.get(id);
+				extPoint.getExtensions().add(extensionAdapters[i]);
+			}
+
+			ModelChangeDelta[] delta = new ModelChangeDelta[extensionAdapters.length];
+			for (int i = 0; i < delta.length; i++) {
+				delta[i] = new ModelChangeDelta(extensionAdapters[i], ModelChangeDelta.ADDED);
+			}
+			fireModelChangeEvent(delta);
+		}
+
+		@Override
+		public void removeExtensions(Extension[] extensionAdapters) {
+			for (int i = 0; i < extensionAdapters.length; i++) {
+				String id = extensionAdapters[i].getExtensionPointUniqueIdentifier();
+				ExtensionPoint extPoint = (ExtensionPoint) extensionPoints.get(id);
+				extPoint.getExtensions().remove(extensionAdapters[i]);
+			}
+
+			ModelChangeDelta[] delta = new ModelChangeDelta[extensionAdapters.length];
+			for (int i = 0; i < delta.length; i++) {
+				delta[i] = new ModelChangeDelta(extensionAdapters[i], ModelChangeDelta.REMOVED);
+			}
+			fireModelChangeEvent(delta);
+
+			for (int i = 0; i < extensionAdapters.length; i++) {
+				extensionAdapters[i].setModel(null);
+			}
+		}
+
+		@Override
+		public void addExtensionPoints(ExtensionPoint[] extensionPointAdapters) {
+			for (int i = 0; i < extensionPointAdapters.length; i++) {
+				extensionPointAdapters[i].setModel(RegistryModel.this);
+				extensionPoints.put(extensionPointAdapters[i].getUniqueIdentifier(), extensionPointAdapters[i]);
+			}
+
+			ModelChangeDelta[] delta = new ModelChangeDelta[extensionPointAdapters.length];
+			for (int i = 0; i < delta.length; i++) {
+				delta[i] = new ModelChangeDelta(extensionPointAdapters[i], ModelChangeDelta.ADDED);
+			}
+			fireModelChangeEvent(delta);
+		}
+
+		@Override
+		public void removeExtensionPoints(ExtensionPoint[] extensionPointAdapters) {
+			for (int i = 0; i < extensionPointAdapters.length; i++) {
+				extensionPoints.remove(extensionPointAdapters[i].getUniqueIdentifier());
+			}
+
+			ModelChangeDelta[] delta = new ModelChangeDelta[extensionPointAdapters.length];
+			for (int i = 0; i < delta.length; i++) {
+				delta[i] = new ModelChangeDelta(extensionPointAdapters[i], ModelChangeDelta.REMOVED);
+			}
+			fireModelChangeEvent(delta);
+
+			for (int i = 0; i < extensionPointAdapters.length; i++) {
+				extensionPointAdapters[i].setModel(null);
+			}
+		}
+	};
+
+	private List listeners = new ArrayList();
+	private Map bundles;
+	private Map services;
+	private Map extensionPoints;
+	private Set serviceNames;
+	private Map fragments;
+
+	protected RegistryBackend backend;
+
+	public RegistryModel(RegistryBackend backend) {
+		bundles = Collections.synchronizedMap(new HashMap());
+		services = Collections.synchronizedMap(new HashMap());
+		extensionPoints = Collections.synchronizedMap(new HashMap());
+		serviceNames = Collections.synchronizedSet(new HashSet());
+		fragments = Collections.synchronizedMap(new HashMap());
+
+		this.backend = backend;
+		backend.setRegistryListener(backendListener);
+	}
+
+	protected void addFragment(Bundle fragment) {
+		Set hostFragments = (Set) fragments.get(fragment.getFragmentHost());
+		if (hostFragments == null) {
+			hostFragments = Collections.synchronizedSet(new HashSet());
+			fragments.put(fragment.getFragmentHost(), hostFragments);
+		}
+
+		if (!hostFragments.add(fragment)) {
+			// not added if element already exists. So remove old and add it again.
+			hostFragments.remove(fragment);
+			hostFragments.add(fragment);
+		}
+	}
+
+	protected void removeFragment(Bundle fragment) {
+		Set hostFragments = (Set) fragments.get(fragment.getFragmentHost());
+		if (hostFragments == null) {
+			return;
+		}
+
+		hostFragments.remove(fragment);
+	}
+
+	public void connect(IProgressMonitor monitor, boolean forceInit) {
+		backend.connect(monitor);
+
+		if (forceInit) {
+			initialize(monitor);
+		}
+	}
+
+	public void initialize(IProgressMonitor monitor) {
+		backend.initializeBundles(monitor);
+		backend.initializeServices(monitor);
+		backend.initializeExtensionPoints(monitor);
+	}
+
+	public void disconnect() {
+		backend.disconnect();
+	}
+
+	public Bundle[] getBundles() {
+		return (Bundle[]) bundles.values().toArray(new Bundle[bundles.values().size()]);
+	}
+
+	public ExtensionPoint[] getExtensionPoints() {
+		return (ExtensionPoint[]) extensionPoints.values().toArray(new ExtensionPoint[extensionPoints.values().size()]);
+	}
+
+	public ServiceRegistration[] getServices() {
+		return (ServiceRegistration[]) services.values().toArray(new ServiceRegistration[services.values().size()]);
+	}
+
+	public ServiceName[] getServiceNames() {
+		return (ServiceName[]) serviceNames.toArray(new ServiceName[serviceNames.size()]);
+	}
+
+	public ServiceRegistration[] getServices(String[] classes) {
+		List result = new ArrayList();
+
+		synchronized (services) {
+			for (Iterator i = services.values().iterator(); i.hasNext();) {
+				ServiceRegistration sr = (ServiceRegistration) i.next();
+				if (Arrays.equals(classes, sr.getName().getClasses()))
+					result.add(sr);
+			}
+		}
+
+		return (ServiceRegistration[]) result.toArray(new ServiceRegistration[result.size()]);
+	}
+
+	public void addModelChangeListener(ModelChangeListener listener) {
+		listeners.add(listener);
+	}
+
+	public void removeModelChangeListener(ModelChangeListener listener) {
+		listeners.remove(listener);
+	}
+
+	/**
+	 * For received domain types: Bundle, IExtension, IExtensionPoint, ServiceReference,
+	 * generates delta with model types: IBundle, IExtensionAdapter, IExtensionPointAdapter, IService
+	 *
+	 * @param objects
+	 */
+	protected void fireModelChangeEvent(ModelChangeDelta[] delta) {
+		for (Iterator i = listeners.iterator(); i.hasNext();) {
+			ModelChangeListener listener = (ModelChangeListener) i.next();
+			listener.modelChanged(delta);
+		}
+	}
+
+	public Bundle getBundle(Long id) {
+		return (Bundle) bundles.get(id);
+	}
+
+	public Bundle getBundle(String symbolicName, String versionRange) {
+		synchronized (bundles) {
+			for (Iterator i = bundles.values().iterator(); i.hasNext();) {
+				Bundle bundle = (Bundle) i.next();
+
+				if (bundle.getSymbolicName().equals(symbolicName)) {
+					if (versionMatches(bundle.getVersion(), versionRange))
+						return bundle;
+				}
+			}
+		}
+
+		return null;
+	}
+
+	public ExtensionPoint getExtensionPoint(String extensionPointUniqueIdentifier) {
+		return (ExtensionPoint) extensionPoints.get(extensionPointUniqueIdentifier);
+	}
+
+	public Bundle[] getFragments(Bundle bundle) {
+		Set set = (Set) fragments.get(bundle.getSymbolicName());
+		if (set == null)
+			return new Bundle[0];
+
+		List result = new ArrayList(set.size());
+		Version hostVersion = Version.parseVersion(bundle.getVersion());
+		for (Iterator i = set.iterator(); i.hasNext();) {
+			Bundle fragment = (Bundle) i.next();
+			String fragmentVersionOrRange = fragment.getFragmentHostVersion();
+
+			if (versionMatches(hostVersion, fragmentVersionOrRange))
+				result.add(fragment);
+		}
+
+		return (Bundle[]) result.toArray(new Bundle[result.size()]);
+	}
+
+	private boolean versionMatches(String hostVersion, String versionOrRange) {
+		try {
+			Version version = Version.parseVersion(hostVersion);
+			return versionMatches(version, versionOrRange);
+
+		} catch (IllegalArgumentException e) {
+			// ignore
+		}
+
+		return false;
+	}
+
+	/**
+	 * Check if hostVersion is greater or equal fragmentVersion, or is included in fragment version range
+	 * @param hostVersion Version
+	 * @param versionOrRange Version or VersionRange
+	 * @return true if matches, false otherwise
+	 */
+	private boolean versionMatches(Version hostVersion, String versionOrRange) {
+		if (versionOrRange == null) {
+			return true;
+		}
+
+		try {
+			Version version = Version.parseVersion(versionOrRange);
+			if (hostVersion.compareTo(version) >= 0)
+				return true;
+
+		} catch (IllegalArgumentException e) {
+			// wrong formatting, try VersionRange
+		}
+
+		try {
+			VersionRange range = new VersionRange(versionOrRange);
+			if (range.isIncluded(hostVersion))
+				return true;
+
+		} catch (IllegalArgumentException e2) {
+			// wrong range formatting
+		}
+
+		return false;
+	}
+
+	/*	void setEnabled(Bundle bundle, boolean enabled);
+
+		void start(Bundle bundle) throws BundleException; // XXX Create custom Exception
+
+		void stop(Bundle bundle) throws BundleException;
+
+		MultiStatus diagnose(Bundle bundle);*/
+
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java
index aa4ada3..ffc43c2 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/RegistryModelFactory.java
@@ -1,25 +1,31 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-/**

- * Produces RegistryModels for URLs. Valid URLs: local target remote://host:port

- */

-public class RegistryModelFactory {

-

-  /**

-   * @param uri

-   * @return never returns null

-   */

-  public static RegistryModel getRegistryModel( String uri ) {

-    return new RegistryModel( new LocalRegistryBackend() );

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+
+/**
+ * Produces RegistryModels for URLs. Valid URLs:
+ * local
+ * target
+ * remote://host:port
+ *
+ */
+public class RegistryModelFactory {
+
+	/**
+	 *
+	 * @param uri
+	 * @return never returns null
+	 */
+	public static RegistryModel getRegistryModel(String uri) {
+		return new RegistryModel(new LocalRegistryBackend());
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceName.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceName.java
index ec8bbf1..345414f 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceName.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceName.java
@@ -50,11 +50,13 @@
 		return result;
 	}
 
+	@Override
 	public int hashCode() {
 		final int prime = 31;
 		return prime * ServiceName.hashCode(classes);
 	}
 
+	@Override
 	public boolean equals(Object obj) {
 		if (this == obj)
 			return true;
@@ -64,6 +66,7 @@
 		return Arrays.equals(classes, other.classes);
 	}
 
+	@Override
 	public int compareTo(Object obj) {
 		if (obj instanceof ServiceName) {
 			// compare first class
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceRegistration.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceRegistration.java
index 8a5f8ab..6e9c8e2 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceRegistration.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/registry/model/ServiceRegistration.java
@@ -1,143 +1,150 @@
-/*******************************************************************************

- *  Copyright (c) 2008, 2011 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     IBM Corporation - initial API and implementation

- *     Wolfgang Schell <ws@jetztgrad.net> - bug 259348, 260055

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.registry.model;

-

-import java.util.HashSet;

-import java.util.Set;

-

-

-public class ServiceRegistration extends ModelObject implements Comparable {

-

-  private long id;

-  private String bundle;

-  private long[] usingBundles = new long[ 0 ];

-  private ServiceName name;

-  private Property[] properties = new Property[ 0 ];

-

-  public void setId( long id ) {

-    this.id = id;

-  }

-

-  public void setBundle( String bundle ) {

-    this.bundle = bundle;

-  }

-

-  public void setUsingBundles( long[] usingBundles ) {

-    if( usingBundles == null )

-      throw new IllegalArgumentException();

-    this.usingBundles = usingBundles;

-  }

-

-  public void setName( ServiceName name ) {

-    if( name == null )

-      throw new IllegalArgumentException();

-    this.name = name;

-  }

-

-  public void setProperties( Property[] properties ) {

-    if( properties == null )

-      throw new IllegalArgumentException();

-    this.properties = properties;

-  }

-

-  public long getId() {

-    return id;

-  }

-

-  public ServiceName getName() {

-    return name;

-  }

-

-  public String getBundle() {

-    return bundle;

-  }

-

-  public long[] getUsingBundleIds() {

-    return usingBundles;

-  }

-

-  public Bundle[] getUsingBundles() {

-    if( usingBundles.length == 0 || model == null ) {

-      return new Bundle[ 0 ];

-    }

-    Set bundles = new HashSet();

-    for( int i = 0; i < usingBundles.length; i++ ) {

-      Bundle bundle = model.getBundle( new Long( usingBundles[ i ] ) );

-      if( bundle != null )

-        bundles.add( bundle );

-    }

-    return ( Bundle[] )bundles.toArray( new Bundle[ bundles.size() ] );

-  }

-

-  public Property[] getProperties() {

-    return properties;

-  }

-

-  public Property getProperty( String name ) {

-    for( int p = 0; p < properties.length; p++ ) {

-      Property property = properties[ p ];

-      if( name.equals( property.getName() ) ) {

-        return property;

-      }

-    }

-    return null;

-  }

-

-  public static String toString( Object value ) {

-    if( value == null ) {

-      return ""; //$NON-NLS-1$

-    } else if( value instanceof CharSequence ) {

-      CharSequence charSequence = ( CharSequence )value;

-      return charSequence.toString();

-    } else if( value instanceof Object[] ) {

-      StringBuffer buff = new StringBuffer();

-      appendString( buff, value );

-      return buff.toString();

-    } else {

-      return value.toString();

-    }

-  }

-

-  public static void appendString( StringBuffer buff, Object value ) {

-    if( value == null ) {

-      // ignore

-    } else if( value instanceof Object[] ) {

-      Object[] objects = ( Object[] )value;

-      buff.append( "[" ); //$NON-NLS-1$

-      for( int o = 0; o < objects.length; o++ ) {

-        Object object = objects[ o ];

-        if( o > 0 )

-          buff.append( ", " ); //$NON-NLS-1$

-        appendString( buff, object );

-      }

-      buff.append( "]" ); //$NON-NLS-1$

-    } else {

-      buff.append( value.toString() );

-    }

-  }

-

-  public boolean equals( Object obj ) {

-    return ( obj instanceof ServiceRegistration ) && ( id == ( ( ( ServiceRegistration )obj ).id ) );

-  }

-

-  public int hashCode() {

-    return ( int )id;

-  }

-

-  public int compareTo( Object obj ) {

-    if( obj instanceof ServiceRegistration ) {

-      ServiceRegistration other = ( ServiceRegistration )obj;

-      return name.compareTo( other.getName() );

-    }

-    return 0;

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2008, 2011 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Wolfgang Schell <ws@jetztgrad.net> - bug 259348, 260055
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.registry.model;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class ServiceRegistration extends ModelObject implements Comparable {
+
+	private long id;
+	private String bundle;
+	private long[] usingBundles = new long[0];
+	private ServiceName name;
+	private Property[] properties = new Property[0];
+
+	public void setId(long id) {
+		this.id = id;
+	}
+
+	public void setBundle(String bundle) {
+		this.bundle = bundle;
+	}
+
+	public void setUsingBundles(long[] usingBundles) {
+		if (usingBundles == null)
+			throw new IllegalArgumentException();
+
+		this.usingBundles = usingBundles;
+	}
+
+	public void setName(ServiceName name) {
+		if (name == null)
+			throw new IllegalArgumentException();
+
+		this.name = name;
+	}
+
+	public void setProperties(Property[] properties) {
+		if (properties == null)
+			throw new IllegalArgumentException();
+
+		this.properties = properties;
+	}
+
+	public long getId() {
+		return id;
+	}
+
+	public ServiceName getName() {
+		return name;
+	}
+
+	public String getBundle() {
+		return bundle;
+	}
+
+	public long[] getUsingBundleIds() {
+		return usingBundles;
+	}
+
+	public Bundle[] getUsingBundles() {
+		if (usingBundles.length == 0 || model == null) {
+			return new Bundle[0];
+		}
+
+		Set bundles = new HashSet();
+		for (int i = 0; i < usingBundles.length; i++) {
+			Bundle bundle = model.getBundle(new Long(usingBundles[i]));
+			if (bundle != null)
+				bundles.add(bundle);
+		}
+		return (Bundle[]) bundles.toArray(new Bundle[bundles.size()]);
+	}
+
+	public Property[] getProperties() {
+		return properties;
+	}
+
+	public Property getProperty(String name) {
+		for (int p = 0; p < properties.length; p++) {
+			Property property = properties[p];
+			if (name.equals(property.getName())) {
+				return property;
+			}
+		}
+		return null;
+	}
+
+	public static String toString(Object value) {
+		if (value == null) {
+			return ""; //$NON-NLS-1$
+		} else if (value instanceof CharSequence) {
+			CharSequence charSequence = (CharSequence) value;
+			return charSequence.toString();
+		} else if (value instanceof Object[]) {
+			StringBuffer buff = new StringBuffer();
+			appendString(buff, value);
+
+			return buff.toString();
+		} else {
+			return value.toString();
+		}
+	}
+
+	public static void appendString(StringBuffer buff, Object value) {
+		if (value == null) {
+			// ignore
+		} else if (value instanceof Object[]) {
+			Object[] objects = (Object[]) value;
+			buff.append("["); //$NON-NLS-1$
+			for (int o = 0; o < objects.length; o++) {
+				Object object = objects[o];
+				if (o > 0)
+					buff.append(", "); //$NON-NLS-1$
+				appendString(buff, object);
+			}
+			buff.append("]"); //$NON-NLS-1$
+		} else {
+			buff.append(value.toString());
+		}
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		return (obj instanceof ServiceRegistration) && (id == (((ServiceRegistration) obj).id));
+	}
+
+	@Override
+	public int hashCode() {
+		return (int) id;
+	}
+
+	@Override
+	public int compareTo(Object obj) {
+		if (obj instanceof ServiceRegistration) {
+			ServiceRegistration other = (ServiceRegistration) obj;
+			return name.compareTo(other.getName());
+		}
+		return 0;
+	}
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
index 132b310..7ff1ed5 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/SpyFormToolkit.java
@@ -14,6 +14,7 @@
  *******************************************************************************/
 package org.eclipse.pde.internal.runtime.spy;
 
+import java.awt.datatransfer.Clipboard;
 import java.util.HashMap;
 import java.util.Map;
 import org.eclipse.help.IContext;
@@ -24,6 +25,8 @@
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.pde.internal.runtime.*;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
 import org.eclipse.swt.events.*;
 import org.eclipse.swt.graphics.*;
 import org.eclipse.swt.widgets.*;
@@ -31,6 +34,7 @@
 import org.eclipse.ui.forms.events.HyperlinkEvent;
 import org.eclipse.ui.forms.widgets.*;
 import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
 
 
 /**
@@ -71,6 +75,7 @@
       this.image = image;
     }
 
+    @Override
     public void run() {
       FileDialog fileChooser = new FileDialog( PDERuntimePlugin.getActiveWorkbenchShell(), SWT.SAVE );
       // RAP [if] Missing API
@@ -117,6 +122,7 @@
     this.dialog = dialog;
   }
 
+  @Override
   public FormText createFormText( Composite parent, boolean trackFocus ) {
     FormText text = super.createFormText( parent, trackFocus );
 // if (PDERuntimePlugin.HAS_IDE_BUNDLES) {
@@ -150,6 +156,7 @@
 // copyQNameItem.addSelectionListener(listener);
     menu.addMenuListener( new MenuAdapter() {
 
+      @Override
       public void menuShown( MenuEvent e ) {
         String href = ( String )formText.getSelectedLinkHref();
         copyQNameItem.setEnabled( href != null && href.startsWith( CLASS_PROTOCOL_PREFIX ) );
@@ -298,7 +305,7 @@
     }
     ToolBarManager manager = new ToolBarManager( SWT.FLAT );
     ToolBar toolbar = manager.createControl( section );
-    final Cursor handCursor = new Cursor( Display.getCurrent(), SWT.CURSOR_HAND );
+    final Cursor handCursor = Display.getCurrent().getSystemCursor( SWT.CURSOR_HAND );
     toolbar.setCursor( handCursor );
     section.setTextClient( toolbar );
     section.setData( "toolbarmanager", manager ); //$NON-NLS-1$
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
index 777f1fe..4c7da19 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/MenuSpyDialog.java
@@ -1,132 +1,135 @@
-/*******************************************************************************

- * Copyright (c) 2009, 2010 EclipseSource 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     EclipseSource - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.dialogs;

-

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.dialogs.PopupDialog;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.pde.internal.runtime.IHelpContextIds;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.PDERuntimePluginImages;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.pde.internal.runtime.spy.sections.ActiveMenuSection;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.swt.graphics.Rectangle;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Event;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.ISharedImages;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.TableWrapLayout;

-

-

-/**

- * @since 3.5

- */

-public class MenuSpyDialog extends PopupDialog {

-

-  private Event event;

-  private Point fAnchor;

-  private Composite composite;

-  private SpyFormToolkit toolkit;

-

-  private class CloseAction extends Action {

-

-    public ImageDescriptor getImageDescriptor() {

-      return PlatformUI.getWorkbench()

-        .getSharedImages()

-        .getImageDescriptor( ISharedImages.IMG_TOOL_DELETE );

-    }

-

-    public String getToolTipText() {

-      return PDERuntimeMessages.get().SpyDialog_close;

-    }

-

-    public void run() {

-      close();

-    }

-  }

-

-  public MenuSpyDialog( Shell parent, Event event, Point point ) {

-    super( parent, SWT.NONE, true, true, false, false, false, null, null );

-    this.event = event;

-    this.fAnchor = point;

-    this.toolkit = new SpyFormToolkit( this );

-  }

-

-  /*

-   * @see org.eclipse.jface.window.Window#configureShell(Shell)

-   */

-  protected void configureShell( Shell shell ) {

-    super.configureShell( shell );

-    PlatformUI.getWorkbench().getHelpSystem().setHelp( shell, IHelpContextIds.SPY_DIALOG );

-  }

-

-  protected Control createContents( Composite parent ) {

-    getShell().setBackground( getShell().getDisplay().getSystemColor( SWT.COLOR_DARK_GRAY ) );

-    initializeBounds();

-    return createDialogArea( parent );

-  }

-

-  protected Control createDialogArea( Composite parent ) {

-    this.composite = ( Composite )super.createDialogArea( parent );

-    ScrolledForm form = toolkit.createScrolledForm( composite );

-    toolkit.decorateFormHeading( form.getForm() );

-    // set title and image

-    form.setText( PDERuntimeMessages.get().MenuSpyDialog_title );

-    Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_SPY_OBJ );

-    form.setImage( image );

-    // add a Close button to the toolbar

-    form.getToolBarManager().add( new CloseAction() );

-    form.getToolBarManager().update( true );

-    TableWrapLayout layout = new TableWrapLayout();

-    layout.leftMargin = 10;

-    layout.rightMargin = 10;

-    layout.topMargin = 10;

-    layout.verticalSpacing = 10;

-    form.getBody().setLayout( layout );

-    // TODO, make this so we use an extension point.

-    ActiveMenuSection section = new ActiveMenuSection();

-    section.build( form, toolkit, event );

-    parent.pack();

-    return composite;

-  }

-

-  protected Point getInitialLocation( Point size ) {

-    if( fAnchor == null ) {

-      return super.getInitialLocation( size );

-    }

-    Point point = fAnchor;

-    Rectangle monitor = getShell().getMonitor().getClientArea();

-    if( monitor.width < point.x + size.x ) {

-      point.x = Math.max( 0, point.x - size.x );

-    }

-    if( monitor.height < point.y + size.y ) {

-      point.y = Math.max( 0, point.y - size.y );

-    }

-    return point;

-  }

-

-  public boolean close() {

-    if( toolkit != null )

-      toolkit.dispose();

-    toolkit = null;

-    return super.close();

-  }

-

-  protected Control getFocusControl() {

-    return this.composite;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009, 2010 EclipseSource 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource - initial API and implementation
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.dialogs;
+
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.PopupDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.pde.internal.runtime.*;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.pde.internal.runtime.spy.sections.ActiveMenuSection;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * @since 3.5
+ */
+public class MenuSpyDialog extends PopupDialog {
+
+  private Event event;
+  private Point fAnchor;
+  private Composite composite;
+  private SpyFormToolkit toolkit;
+
+  private class CloseAction extends Action {
+
+    @Override
+    public ImageDescriptor getImageDescriptor() {
+      return PlatformUI.getWorkbench()
+        .getSharedImages()
+        .getImageDescriptor( ISharedImages.IMG_TOOL_DELETE );
+    }
+
+    @Override
+    public String getToolTipText() {
+      return PDERuntimeMessages.get().SpyDialog_close;
+    }
+
+    @Override
+    public void run() {
+      close();
+    }
+  }
+
+  public MenuSpyDialog( Shell parent, Event event, Point point ) {
+    super( parent, SWT.NONE, true, true, false, false, false, null, null );
+    this.event = event;
+    this.fAnchor = point;
+    this.toolkit = new SpyFormToolkit( this );
+  }
+
+  /*
+   * @see org.eclipse.jface.window.Window#configureShell(Shell)
+   */
+  @Override
+  protected void configureShell( Shell shell ) {
+    super.configureShell( shell );
+    PlatformUI.getWorkbench().getHelpSystem().setHelp( shell, IHelpContextIds.SPY_DIALOG );
+  }
+
+  @Override
+  protected Control createContents( Composite parent ) {
+    getShell().setBackground( getShell().getDisplay().getSystemColor( SWT.COLOR_DARK_GRAY ) );
+    initializeBounds();
+    return createDialogArea( parent );
+  }
+
+  @Override
+  protected Control createDialogArea( Composite parent ) {
+    this.composite = ( Composite )super.createDialogArea( parent );
+    ScrolledForm form = toolkit.createScrolledForm( composite );
+    toolkit.decorateFormHeading( form.getForm() );
+    // set title and image
+    form.setText( PDERuntimeMessages.get().MenuSpyDialog_title );
+    Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_SPY_OBJ );
+    form.setImage( image );
+    // add a Close button to the toolbar
+    form.getToolBarManager().add( new CloseAction() );
+    form.getToolBarManager().update( true );
+    TableWrapLayout layout = new TableWrapLayout();
+    layout.leftMargin = 10;
+    layout.rightMargin = 10;
+    layout.topMargin = 10;
+    layout.verticalSpacing = 10;
+    form.getBody().setLayout( layout );
+    // TODO, make this so we use an extension point.
+    ActiveMenuSection section = new ActiveMenuSection();
+    section.build( form, toolkit, event );
+    parent.pack();
+    return composite;
+  }
+
+  @Override
+  protected Point getInitialLocation( Point size ) {
+    if( fAnchor == null ) {
+      return super.getInitialLocation( size );
+    }
+    Point point = fAnchor;
+    Rectangle monitor = getShell().getMonitor().getClientArea();
+    if( monitor.width < point.x + size.x ) {
+      point.x = Math.max( 0, point.x - size.x );
+    }
+    if( monitor.height < point.y + size.y ) {
+      point.y = Math.max( 0, point.y - size.y );
+    }
+    return point;
+  }
+
+  @Override
+  public boolean close() {
+    if( toolkit != null )
+      toolkit.dispose();
+    toolkit = null;
+    return super.close();
+  }
+
+  @Override
+  protected Control getFocusControl() {
+    return this.composite;
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
index db9cd6b..ae10bae 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/dialogs/SpyDialog.java
@@ -1,140 +1,149 @@
-/*******************************************************************************

- * 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 211580

- *     Arnaud Mergey <a_mergey@yahoo.fr>              - RAP port

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.dialogs;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.jface.action.Action;

-import org.eclipse.jface.dialogs.PopupDialog;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.pde.internal.runtime.*;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.pde.internal.runtime.spy.sections.*;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.graphics.*;

-import org.eclipse.swt.widgets.*;

-import org.eclipse.ui.ISharedImages;

-import org.eclipse.ui.PlatformUI;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.TableWrapLayout;

-

-

-/**

- * @since 3.4

- */

-public class SpyDialog extends PopupDialog {

-

-  private ExecutionEvent event;

-  private Point fAnchor;

-  private Composite composite;

-  private SpyFormToolkit toolkit;

-

-  private class CloseAction extends Action {

-

-    public ImageDescriptor getImageDescriptor() {

-      return PlatformUI.getWorkbench()

-        .getSharedImages()

-        .getImageDescriptor( ISharedImages.IMG_TOOL_DELETE );

-    }

-

-    public String getToolTipText() {

-      return PDERuntimeMessages.get().SpyDialog_close;

-    }

-

-    public void run() {

-      close();

-    }

-  }

-

-  public SpyDialog( Shell parent, ExecutionEvent event, Point point ) {

-    super( parent, SWT.NONE, true, true, false, false, false, null, null );

-    this.event = event;

-    this.fAnchor = point;

-    this.toolkit = new SpyFormToolkit( this );

-  }

-

-  /*

-   * @see org.eclipse.jface.window.Window#configureShell(Shell)

-   */

-  protected void configureShell( Shell shell ) {

-    super.configureShell( shell );

-    PlatformUI.getWorkbench().getHelpSystem().setHelp( shell, IHelpContextIds.SPY_DIALOG );

-  }

-

-  protected Control createContents( Composite parent ) {

-    getShell().setBackground( getShell().getDisplay().getSystemColor( SWT.COLOR_DARK_GRAY ) );

-    initializeBounds();

-    return createDialogArea( parent );

-  }

-

-  protected Control createDialogArea( Composite parent ) {

-    this.composite = ( Composite )super.createDialogArea( parent );

-    ScrolledForm form = toolkit.createScrolledForm( composite );

-    toolkit.decorateFormHeading( form.getForm() );

-    // set title and image

-    form.setText( PDERuntimeMessages.get().SpyDialog_title );

-    Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_SPY_OBJ );

-    form.setImage( image );

-    // add a Close button to the toolbar

-    form.getToolBarManager().add( new CloseAction() );

-    form.getToolBarManager().update( true );

-    TableWrapLayout layout = new TableWrapLayout();

-    layout.leftMargin = 10;

-    layout.rightMargin = 10;

-    layout.topMargin = 10;

-    layout.verticalSpacing = 10;

-    form.getBody().setLayout( layout );

-    // TODO, make this so we use an extension point.

-    ISpySection section = new ActiveShellSection();

-    section.build( form, toolkit, event );

-    section = new ActivePartSection();

-    section.build( form, toolkit, event );

-    section = new ActiveFormEditorSection();

-    section.build( form, toolkit, event );

-    section = new ActiveSelectionSection();

-    section.build( form, toolkit, event );

-    section = new ActiveWizardSection();

-    section.build( form, toolkit, event );

-    section = new ActiveDialogPageSection();

-    section.build( form, toolkit, event );

-    section = new ActiveHelpSection();

-    section.build( form, toolkit, event );

-    parent.pack();

-    return composite;

-  }

-

-  protected Point getInitialLocation( Point size ) {

-    if( fAnchor == null ) {

-      return super.getInitialLocation( size );

-    }

-    Point point = fAnchor;

-    Rectangle monitor = getShell().getMonitor().getClientArea();

-    if( monitor.width < point.x + size.x ) {

-      point.x = Math.max( 0, point.x - size.x );

-    }

-    if( monitor.height < point.y + size.y ) {

-      point.y = Math.max( 0, point.y - size.y );

-    }

-    return point;

-  }

-

-  public boolean close() {

-    if( toolkit != null )

-      toolkit.dispose();

-    toolkit = null;

-    return super.close();

-  }

-

-  protected Control getFocusControl() {

-    return this.composite;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2007, 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 211580
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.dialogs;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.dialogs.PopupDialog;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.pde.internal.runtime.*;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.pde.internal.runtime.spy.sections.*;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.*;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.ISharedImages;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+import org.eclipse.ui.forms.widgets.TableWrapLayout;
+
+
+/**
+ * @since 3.4
+ */
+public class SpyDialog extends PopupDialog {
+
+  private ExecutionEvent event;
+  private Point fAnchor;
+  private Composite composite;
+  private SpyFormToolkit toolkit;
+
+  private class CloseAction extends Action {
+
+    @Override
+    public ImageDescriptor getImageDescriptor() {
+      return PlatformUI.getWorkbench()
+        .getSharedImages()
+        .getImageDescriptor( ISharedImages.IMG_TOOL_DELETE );
+    }
+
+    @Override
+    public String getToolTipText() {
+      return PDERuntimeMessages.get().SpyDialog_close;
+    }
+
+    @Override
+    public void run() {
+      close();
+    }
+  }
+
+  public SpyDialog( Shell parent, ExecutionEvent event, Point point ) {
+    super( parent, SWT.NONE, true, true, false, false, false, null, null );
+    this.event = event;
+    this.fAnchor = point;
+    this.toolkit = new SpyFormToolkit( this );
+  }
+
+  /*
+   * @see org.eclipse.jface.window.Window#configureShell(Shell)
+   */
+  @Override
+  protected void configureShell( Shell shell ) {
+    super.configureShell( shell );
+    PlatformUI.getWorkbench().getHelpSystem().setHelp( shell, IHelpContextIds.SPY_DIALOG );
+  }
+
+  @Override
+  protected Control createContents( Composite parent ) {
+    getShell().setBackground( getShell().getDisplay().getSystemColor( SWT.COLOR_DARK_GRAY ) );
+    initializeBounds();
+    return createDialogArea( parent );
+  }
+
+  @Override
+  protected Control createDialogArea( Composite parent ) {
+    this.composite = ( Composite )super.createDialogArea( parent );
+    ScrolledForm form = toolkit.createScrolledForm( composite );
+    toolkit.decorateFormHeading( form.getForm() );
+    // set title and image
+    form.setText( PDERuntimeMessages.get().SpyDialog_title );
+    Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_SPY_OBJ );
+    form.setImage( image );
+    // add a Close button to the toolbar
+    form.getToolBarManager().add( new CloseAction() );
+    form.getToolBarManager().update( true );
+    TableWrapLayout layout = new TableWrapLayout();
+    layout.leftMargin = 10;
+    layout.rightMargin = 10;
+    layout.topMargin = 10;
+    layout.verticalSpacing = 10;
+    form.getBody().setLayout( layout );
+    // TODO, make this so we use an extension point.
+    ISpySection section = new ActiveShellSection();
+    section.build( form, toolkit, event );
+    section = new ActivePartSection();
+    section.build( form, toolkit, event );
+    section = new ActiveFormEditorSection();
+    section.build( form, toolkit, event );
+    section = new ActiveSelectionSection();
+    section.build( form, toolkit, event );
+    section = new ActiveWizardSection();
+    section.build( form, toolkit, event );
+    section = new ActiveDialogPageSection();
+    section.build( form, toolkit, event );
+    section = new ActiveHelpSection();
+    section.build( form, toolkit, event );
+    parent.pack();
+    return composite;
+  }
+
+  @Override
+  protected Point getInitialLocation( Point size ) {
+    if( fAnchor == null ) {
+      return super.getInitialLocation( size );
+    }
+    Point point = fAnchor;
+    Rectangle monitor = getShell().getMonitor().getClientArea();
+    if( monitor.width < point.x + size.x ) {
+      point.x = Math.max( 0, point.x - size.x );
+    }
+    if( monitor.height < point.y + size.y ) {
+      point.y = Math.max( 0, point.y - size.y );
+    }
+    return point;
+  }
+
+  @Override
+  public boolean close() {
+    if( toolkit != null )
+      toolkit.dispose();
+    toolkit = null;
+    return super.close();
+  }
+
+  @Override
+  protected Control getFocusControl() {
+    return this.composite;
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/handlers/SpyHandler.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/handlers/SpyHandler.java
index aff5f4c..a3e965f 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/handlers/SpyHandler.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/handlers/SpyHandler.java
@@ -1,44 +1,38 @@
-/*******************************************************************************

- * Copyright (c) 2007, 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *     Kevin Doyle <kjdoyle@ca.ibm.com> - bug 200727

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.handlers;

-

-import org.eclipse.core.commands.AbstractHandler;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.pde.internal.runtime.spy.dialogs.SpyDialog;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-/**

- * @since 3.4

- */

-public class SpyHandler extends AbstractHandler {

-

-  private SpyDialog INSTANCE = null;

-

-  public SpyHandler() { // do nothing

-  }

-

-  public Object execute( ExecutionEvent event ) {

-    if( event != null ) {

-      if( INSTANCE != null && INSTANCE.getShell() != null && !INSTANCE.getShell().isDisposed() ) {

-        INSTANCE.close();

-      }

-      Shell shell = HandlerUtil.getActiveShell( event );

-      SpyDialog dialog = new SpyDialog( shell, event, shell.getDisplay().getCursorLocation() );

-      INSTANCE = dialog;

-      dialog.create();

-      dialog.open();

-    }

-    return null;

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2007, 2015 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Kevin Doyle <kjdoyle@ca.ibm.com> - bug 200727
+ *     Lars Vogel <Lars.Vogel@vogella.com> - Bug 482175
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.handlers;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.pde.internal.runtime.spy.dialogs.SpyDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+public class SpyHandler extends AbstractHandler {
+
+	private SpyDialog spyDialog = null;
+
+
+	@Override
+	public Object execute(ExecutionEvent event) {
+		if (spyDialog != null && spyDialog.getShell() != null && !spyDialog.getShell().isDisposed()) {
+			spyDialog.close();
+		}
+		Shell shell = HandlerUtil.getActiveShell(event);
+		spyDialog = new SpyDialog(shell, event, shell.getDisplay().getCursorLocation());
+		spyDialog.create();
+		spyDialog.open();
+		return null;
+	}
+
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveDialogPageSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveDialogPageSection.java
index 0a2a8ca..8a208ea 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveDialogPageSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveDialogPageSection.java
@@ -1,80 +1,78 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *     Kevin Doyle <kjdoyle@ca.ibm.com> - bug 207868, 207904

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.jface.dialogs.IDialogPage;

-import org.eclipse.jface.dialogs.IPageChangeProvider;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.PDERuntimePlugin;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.forms.widgets.ExpandableComposite;

-import org.eclipse.ui.forms.widgets.FormText;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.Section;

-import org.eclipse.ui.forms.widgets.TableWrapData;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.osgi.framework.Bundle;

-import org.osgi.service.packageadmin.PackageAdmin;

-

-

-/**

- * @since 3.4

- */

-public class ActiveDialogPageSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    final Shell shell = HandlerUtil.getActiveShell( event );

-    Object object = shell.getData();

-    if( object == null )

-      return;

-    Class clazz = object.getClass();

-    if( object instanceof IPageChangeProvider ) {

-      IPageChangeProvider pageChangeProvider = ( IPageChangeProvider )object;

-      Object selectedPage = pageChangeProvider.getSelectedPage();

-      if( selectedPage != null ) {

-        Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-        section.clientVerticalSpacing = 9;

-        if( selectedPage instanceof IDialogPage ) {

-          IDialogPage page = ( IDialogPage )selectedPage;

-          clazz = page.getClass();

-          section.setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeDialogPageSection_title,

-                                     page.getTitle() ) );

-        } else {

-          clazz = selectedPage.getClass();

-          section.setText( PDERuntimeMessages.get().SpyDialog_activeDialogPageSection_title2 );

-        }

-        // the active page

-        FormText text = toolkit.createFormText( section, true );

-        section.setClient( text );

-        TableWrapData td = new TableWrapData();

-        td.align = TableWrapData.FILL;

-        td.grabHorizontal = true;

-        section.setLayoutData( td );

-        StringBuffer buffer = new StringBuffer();

-        buffer.append( "<form>" ); //$NON-NLS-1$

-        buffer.append( toolkit.createClassSection( text,

-                                                   PDERuntimeMessages.get().SpyDialog_activeDialogPageSection_desc,

-                                                   new Class[] {

-                                                     clazz

-                                                   } ) );

-        PackageAdmin admin = PDERuntimePlugin.getDefault().getPackageAdmin();

-        Bundle bundle = admin.getBundle( clazz );

-        toolkit.generatePluginDetailsText( bundle, null, "dialog page", buffer, text ); //$NON-NLS-1$

-        buffer.append( "</form>" ); //$NON-NLS-1$

-        text.setText( buffer.toString(), true, false );

-      }

-    }

-  }

-}

+/*******************************************************************************
+ *  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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Kevin Doyle <kjdoyle@ca.ibm.com> - bug 207868, 207904
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.dialogs.IDialogPage;
+import org.eclipse.jface.dialogs.IPageChangeProvider;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+
+/**
+ * @since 3.4
+ */
+public class ActiveDialogPageSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    final Shell shell = HandlerUtil.getActiveShell( event );
+    Object object = shell.getData();
+    if( object == null )
+      return;
+    Class clazz = object.getClass();
+    if( object instanceof IPageChangeProvider ) {
+      IPageChangeProvider pageChangeProvider = ( IPageChangeProvider )object;
+      Object selectedPage = pageChangeProvider.getSelectedPage();
+      if( selectedPage != null ) {
+        Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+        section.clientVerticalSpacing = 9;
+        if( selectedPage instanceof IDialogPage ) {
+          IDialogPage page = ( IDialogPage )selectedPage;
+          clazz = page.getClass();
+          section
+            .setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeDialogPageSection_title,
+                                page.getTitle() ) );
+        } else {
+          clazz = selectedPage.getClass();
+          section.setText( PDERuntimeMessages.get().SpyDialog_activeDialogPageSection_title2 );
+        }
+        // the active page
+        FormText text = toolkit.createFormText( section, true );
+        section.setClient( text );
+        TableWrapData td = new TableWrapData();
+        td.align = TableWrapData.FILL;
+        td.grabHorizontal = true;
+        section.setLayoutData( td );
+        StringBuffer buffer = new StringBuffer();
+        buffer.append( "<form>" ); //$NON-NLS-1$
+        buffer.append( toolkit.createClassSection( text,
+                                                   PDERuntimeMessages
+                                                     .get().SpyDialog_activeDialogPageSection_desc,
+                                                   new Class[] {
+                                                     clazz
+        } ) );
+        Bundle bundle = FrameworkUtil.getBundle( clazz );
+        toolkit.generatePluginDetailsText( bundle, null, "dialog page", buffer, text ); //$NON-NLS-1$
+        buffer.append( "</form>" ); //$NON-NLS-1$
+        text.setText( buffer.toString(), true, false );
+      }
+    }
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
index c742c25..5a08231 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveFormEditorSection.java
@@ -1,58 +1,64 @@
-/*******************************************************************************

- * Copyright (c) 2008, 2012 Code 9 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Code 9 Corporation - initial API and implementation

- *     Ketan Padegaonkar <KetanPadegaonkar@gmail.com> - bug 241912

- *     Tomasz Zarna <tomasz.zarna@tasktop.com> - bug 299298

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.forms.editor.FormEditor;

-import org.eclipse.ui.forms.editor.IFormPage;

-import org.eclipse.ui.forms.widgets.*;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-public class ActiveFormEditorSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    final IWorkbenchPart part = HandlerUtil.getActivePart( event );

-    if( !( part instanceof FormEditor ) )

-      return;

-    FormEditor multiEditor = ( FormEditor )part;

-    Shell shell = HandlerUtil.getActiveShell( event );

-    Object object = shell.getData();

-    if( object == null )

-      return;

-    IFormPage activePage = multiEditor.getActivePageInstance();

-    if( activePage == null )

-      return;

-    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-    section.setText( PDERuntimeMessages.get().ActiveFormEditorSection_Active_Form_Page );

-    FormText text = toolkit.createFormText( section, true );

-    section.setClient( text );

-    TableWrapData td = new TableWrapData();

-    td.align = TableWrapData.FILL;

-    td.grabHorizontal = true;

-    section.setLayoutData( td );

-    StringBuffer buffer = new StringBuffer();

-    buffer.append( "<form>" ); //$NON-NLS-1$

-    buffer.append( toolkit.createClassSection( text,

-                                               NLS.bind( PDERuntimeMessages.get().SpyDialog_activePart_desc,

-                                                         "editor tab" ), new Class[] { activePage.getClass()} ) ); //$NON-NLS-1$

-    buffer.append( "</form>" ); //$NON-NLS-1$

-    text.setText( buffer.toString(), true, false );

-    text.layout();

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2008, 2012 Code 9 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Code 9 Corporation - initial API and implementation
+ *     Ketan Padegaonkar <KetanPadegaonkar@gmail.com> - bug 241912
+ *     Tomasz Zarna <tomasz.zarna@tasktop.com> - bug 299298
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.forms.editor.FormEditor;
+import org.eclipse.ui.forms.editor.IFormPage;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+
+public class ActiveFormEditorSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    final IWorkbenchPart part = HandlerUtil.getActivePart( event );
+    if( !( part instanceof FormEditor ) )
+      return;
+    FormEditor multiEditor = ( FormEditor )part;
+    Shell shell = HandlerUtil.getActiveShell( event );
+    Object object = shell.getData();
+    if( object == null )
+      return;
+    IFormPage activePage = multiEditor.getActivePageInstance();
+    if( activePage == null )
+      return;
+    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+    section.setText( PDERuntimeMessages.get().ActiveFormEditorSection_Active_Form_Page );
+    FormText text = toolkit.createFormText( section, true );
+    section.setClient( text );
+    TableWrapData td = new TableWrapData();
+    td.align = TableWrapData.FILL;
+    td.grabHorizontal = true;
+    section.setLayoutData( td );
+    StringBuffer buffer = new StringBuffer();
+    buffer.append( "<form>" ); //$NON-NLS-1$
+    buffer.append( toolkit
+      .createClassSection( text,
+                           NLS.bind( PDERuntimeMessages.get().SpyDialog_activePart_desc,
+                                     "editor tab" ), //$NON-NLS-1$
+                           new Class[] {
+                             activePage.getClass()
+    } ) );
+    buffer.append( "</form>" ); //$NON-NLS-1$
+    text.setText( buffer.toString(), true, false );
+    text.layout();
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveHelpSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveHelpSection.java
index 6b19cf7..8bd0221 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveHelpSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveHelpSection.java
@@ -1,176 +1,166 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *     Remy Suen <remy.suen@gmail.com> - bug 203451

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.help.IContext;

-import org.eclipse.help.IContextProvider;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.preference.IPreferencePage;

-import org.eclipse.jface.preference.PreferenceDialog;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.PDERuntimePlugin;

-import org.eclipse.pde.internal.runtime.PDERuntimePluginImages;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.swt.widgets.Composite;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.swt.widgets.Widget;

-import org.eclipse.ui.IEditorPart;

-import org.eclipse.ui.IEditorReference;

-import org.eclipse.ui.IViewReference;

-import org.eclipse.ui.IWorkbenchPart;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.forms.widgets.ExpandableComposite;

-import org.eclipse.ui.forms.widgets.FormText;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.Section;

-import org.eclipse.ui.forms.widgets.TableWrapData;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.eclipse.ui.internal.WorkbenchPartReference;

-import org.eclipse.ui.part.ViewPart;

-

-

-/**

- * @since 3.4

- */

-public class ActiveHelpSection implements ISpySection {

-

-  private SpyFormToolkit toolkit;

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    this.toolkit = toolkit;

-    final Shell shell = HandlerUtil.getActiveShell( event );

-    Object object = shell.getData();

-    if( object == null )

-      return;

-    StringBuffer helpBuffer = new StringBuffer();

-    // process help

-    // TODO we need to make this cleaner... help processing is complicated atm

-    if( object instanceof PreferenceDialog ) {

-      PreferenceDialog dialog = ( PreferenceDialog )object;

-      IPreferencePage page = ( IPreferencePage )dialog.getSelectedPage();

-      processHelp( page.getControl().getShell(), helpBuffer );

-      processChildren( page.getControl(), helpBuffer );

-    } else if( object instanceof Dialog ) {

-      Dialog dialog = ( Dialog )object;

-      processChildren( dialog.getShell(), helpBuffer );

-    } else {

-      helpBuffer.append( processControlHelp( event, toolkit ) );

-    }

-    if( helpBuffer != null && helpBuffer.length() > 0 ) {

-      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-      section.setText( PDERuntimeMessages.get().SpyDialog_activeHelpSection_title );

-      section.clientVerticalSpacing = 9;

-      FormText text = toolkit.createFormText( section, true );

-      section.setClient( text );

-      TableWrapData td = new TableWrapData();

-      td.align = TableWrapData.FILL;

-      td.grabHorizontal = true;

-      section.setLayoutData( td );

-      Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_CONTEXTID_OBJ );

-      text.setImage( "contextid", image ); //$NON-NLS-1$

-      StringBuffer buffer = new StringBuffer();

-      buffer.append( "<form>" ); //$NON-NLS-1$

-      buffer.append( "<p>" ); //$NON-NLS-1$

-      buffer.append( PDERuntimeMessages.get().SpyDialog_activeHelpSection_desc );

-      buffer.append( "</p>" ); //$NON-NLS-1$

-      buffer.append( helpBuffer.toString() );

-      buffer.append( "</form>" ); //$NON-NLS-1$

-      String content = buffer.toString().replaceAll( "&", "&amp;" ); //$NON-NLS-1$ //$NON-NLS-2$

-      text.setText( content, true, false );

-    }

-  }

-

-  private void processHelp( Widget widget, StringBuffer buffer ) {

-    buffer.append( toolkit.createHelpIdentifierSection( widget ) );

-  }

-

-  private void processChildren( Control control, StringBuffer buffer ) {

-    processHelp( control, buffer );

-    if( control instanceof Composite ) {

-      Composite composite = ( Composite )control;

-      Control[] controls = composite.getChildren();

-      for( int i = 0; i < controls.length; i++ ) {

-        processChildren( controls[ i ], buffer );

-      }

-    }

-  }

-

-  private String processControlHelp( ExecutionEvent event, SpyFormToolkit toolkit ) {

-    IWorkbenchPart part = HandlerUtil.getActivePart( event );

-    if( part == null )

-      return null;

-    IWorkbenchWindow window = part.getSite().getWorkbenchWindow();

-    if( window == null )

-      return null;

-    StringBuffer buffer = new StringBuffer();

-    Shell shell = null;

-    Control control = null;

-    if( part instanceof IEditorPart ) {

-      IEditorPart editorPart = ( IEditorPart )part;

-      shell = editorPart.getSite().getShell();

-      for( int j = 0; j < window.getActivePage().getEditorReferences().length; j++ ) {

-        IEditorReference er = window.getActivePage().getEditorReferences()[ j ];

-        if( er.getId().equals( editorPart.getEditorSite().getId() ) )

-          if( er instanceof WorkbenchPartReference ) {

-            WorkbenchPartReference wpr = ( WorkbenchPartReference )er;

-            control = wpr.getPane().getControl();

-            shell = null;

-            break;

-          }

-      }

-    } else if( part instanceof ViewPart ) {

-      ViewPart viewPart = ( ViewPart )part;

-      shell = viewPart.getSite().getShell();

-      for( int j = 0; j < window.getActivePage().getViewReferences().length; j++ ) {

-        IViewReference vr = window.getActivePage().getViewReferences()[ j ];

-        if( vr.getId().equals( viewPart.getViewSite().getId() ) )

-          if( vr instanceof WorkbenchPartReference ) {

-            WorkbenchPartReference wpr = ( WorkbenchPartReference )vr;

-            control = wpr.getPane().getControl();

-            shell = null;

-            break;

-          }

-      }

-    }

-    if( shell != null ) {

-      buffer.append( toolkit.createHelpIdentifierSection( shell ) );

-      for( int i = 0; i < shell.getChildren().length; i++ ) {

-        processChildren( shell.getChildren()[ i ], buffer );

-      }

-    } else if( control != null ) {

-// // if we don't have org.eclipse.help, we will have problems when trying to load IContextProvider

-// if (!PDERuntimePlugin.HAS_IDE_BUNDLES)

-// processChildren(control, buffer);

-// else {

-      IContextProvider provider = ( IContextProvider )part.getAdapter( IContextProvider.class );

-      IContext context = ( provider != null )

-                                             ? provider.getContext( control )

-                                             : null;

-      if( context != null ) {

-        buffer.append( toolkit.createHelpIdentifierSection( context ) );

-      } else {

-        buffer.append( toolkit.createHelpIdentifierSection( control ) );

-      }

-      if( control instanceof Composite ) {

-        Composite parent = ( Composite )control;

-        for( int i = 0; i < parent.getChildren().length; i++ ) {

-          processChildren( parent.getChildren()[ i ], buffer );

-        }

-      }

-    }

-// }

-    return buffer.toString();

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2007, 2015 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Remy Suen <remy.suen@gmail.com> - bug 203451
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.help.IContext;
+import org.eclipse.help.IContextProvider;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.preference.IPreferencePage;
+import org.eclipse.jface.preference.PreferenceDialog;
+import org.eclipse.pde.internal.runtime.*;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.WorkbenchPartReference;
+import org.eclipse.ui.part.ViewPart;
+
+
+/**
+ * @since 3.4
+ */
+public class ActiveHelpSection implements ISpySection {
+
+  private SpyFormToolkit toolkit;
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    this.toolkit = toolkit;
+    final Shell shell = HandlerUtil.getActiveShell( event );
+    Object object = shell.getData();
+    if( object == null )
+      return;
+    StringBuffer helpBuffer = new StringBuffer();
+    // process help
+    // TODO we need to make this cleaner... help processing is complicated atm
+    if( object instanceof PreferenceDialog ) {
+      PreferenceDialog dialog = ( PreferenceDialog )object;
+      IPreferencePage page = ( IPreferencePage )dialog.getSelectedPage();
+      processHelp( page.getControl().getShell(), helpBuffer );
+      processChildren( page.getControl(), helpBuffer );
+    } else if( object instanceof Dialog ) {
+      Dialog dialog = ( Dialog )object;
+      processChildren( dialog.getShell(), helpBuffer );
+    } else {
+      helpBuffer.append( processControlHelp( event, toolkit ) );
+    }
+    if( helpBuffer.length() > 0 ) {
+      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+      section.setText( PDERuntimeMessages.get().SpyDialog_activeHelpSection_title );
+      section.clientVerticalSpacing = 9;
+      FormText text = toolkit.createFormText( section, true );
+      section.setClient( text );
+      TableWrapData td = new TableWrapData();
+      td.align = TableWrapData.FILL;
+      td.grabHorizontal = true;
+      section.setLayoutData( td );
+      Image image = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_CONTEXTID_OBJ );
+      text.setImage( "contextid", image ); //$NON-NLS-1$
+      StringBuffer buffer = new StringBuffer();
+      buffer.append( "<form>" ); //$NON-NLS-1$
+      buffer.append( "<p>" ); //$NON-NLS-1$
+      buffer.append( PDERuntimeMessages.get().SpyDialog_activeHelpSection_desc );
+      buffer.append( "</p>" ); //$NON-NLS-1$
+      buffer.append( helpBuffer.toString() );
+      buffer.append( "</form>" ); //$NON-NLS-1$
+      String content = buffer.toString().replaceAll( "&", "&amp;" ); //$NON-NLS-1$ //$NON-NLS-2$
+      text.setText( content, true, false );
+    }
+  }
+
+  private void processHelp( Widget widget, StringBuffer buffer ) {
+    buffer.append( toolkit.createHelpIdentifierSection( widget ) );
+  }
+
+  private void processChildren( Control control, StringBuffer buffer ) {
+    processHelp( control, buffer );
+    if( control instanceof Composite ) {
+      Composite composite = ( Composite )control;
+      Control[] controls = composite.getChildren();
+      for( int i = 0; i < controls.length; i++ ) {
+        processChildren( controls[ i ], buffer );
+      }
+    }
+  }
+
+  private String processControlHelp( ExecutionEvent event, SpyFormToolkit toolkit ) {
+    IWorkbenchPart part = HandlerUtil.getActivePart( event );
+    if( part == null )
+      return null;
+    IWorkbenchWindow window = part.getSite().getWorkbenchWindow();
+    if( window == null )
+      return null;
+    StringBuffer buffer = new StringBuffer();
+    Shell shell = null;
+    Control control = null;
+    if( part instanceof IEditorPart ) {
+      IEditorPart editorPart = ( IEditorPart )part;
+      shell = editorPart.getSite().getShell();
+      for( int j = 0; j < window.getActivePage().getEditorReferences().length; j++ ) {
+        IEditorReference er = window.getActivePage().getEditorReferences()[ j ];
+        if( er.getId().equals( editorPart.getEditorSite().getId() ) )
+          if( er instanceof WorkbenchPartReference ) {
+            WorkbenchPartReference wpr = ( WorkbenchPartReference )er;
+            control = wpr.getPane().getControl();
+            shell = null;
+            break;
+          }
+      }
+    } else if( part instanceof ViewPart ) {
+      ViewPart viewPart = ( ViewPart )part;
+      shell = viewPart.getSite().getShell();
+      for( int j = 0; j < window.getActivePage().getViewReferences().length; j++ ) {
+        IViewReference vr = window.getActivePage().getViewReferences()[ j ];
+        if( vr.getId().equals( viewPart.getViewSite().getId() ) )
+          if( vr instanceof WorkbenchPartReference ) {
+            WorkbenchPartReference wpr = ( WorkbenchPartReference )vr;
+            control = wpr.getPane().getControl();
+            shell = null;
+            break;
+          }
+      }
+    }
+    if( shell != null ) {
+      buffer.append( toolkit.createHelpIdentifierSection( shell ) );
+      for( int i = 0; i < shell.getChildren().length; i++ ) {
+        processChildren( shell.getChildren()[ i ], buffer );
+      }
+    } else if( control != null ) {
+      // if we don't have org.eclipse.help, we will have problems when trying to load
+      // IContextProvider
+      if( !PDERuntimePlugin.HAS_IDE_BUNDLES )
+        processChildren( control, buffer );
+      else {
+        IContextProvider provider = ( IContextProvider )part.getAdapter( IContextProvider.class );
+        IContext context = ( provider != null )
+                                                ? provider.getContext( control )
+                                                : null;
+        if( context != null ) {
+          buffer.append( toolkit.createHelpIdentifierSection( context ) );
+        } else {
+          buffer.append( toolkit.createHelpIdentifierSection( control ) );
+        }
+        if( control instanceof Composite ) {
+          Composite parent = ( Composite )control;
+          for( int i = 0; i < parent.getChildren().length; i++ ) {
+            processChildren( parent.getChildren()[ i ], buffer );
+          }
+        }
+      }
+    }
+    return buffer.toString();
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
index fd99524..4b2ffec 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveMenuSection.java
@@ -1,230 +1,231 @@
-/*******************************************************************************

- * Copyright (c) 2009, 2010 EclipseSource 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     EclipseSource Corporation - initial API and implementation

- *     Anyware Technologies - ongoing enhancements

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import java.lang.reflect.Field;

-import java.lang.reflect.Method;

-import org.eclipse.core.commands.Command;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.jface.action.*;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.PDERuntimePlugin;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.*;

-import org.eclipse.ui.IActionDelegate;

-import org.eclipse.ui.actions.RetargetAction;

-import org.eclipse.ui.forms.widgets.*;

-import org.eclipse.ui.internal.*;

-import org.eclipse.ui.menus.CommandContributionItem;

-import org.osgi.framework.Bundle;

-import org.osgi.service.packageadmin.PackageAdmin;

-

-

-/**

- * @since 3.5

- */

-public class ActiveMenuSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, Event event ) {

-    Object object = event.widget.getData();

-    if( object != null ) {

-      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-      section.clientVerticalSpacing = 9;

-      section.setText( PDERuntimeMessages.get().SpyDialog_activeSelection_title );

-      FormText text = toolkit.createFormText( section, true );

-      section.setClient( text );

-      TableWrapData td = new TableWrapData();

-      td.align = TableWrapData.FILL;

-      td.grabHorizontal = true;

-      section.setLayoutData( td );

-      StringBuffer buffer = new StringBuffer();

-      buffer.append( "<form>" ); //$NON-NLS-1$

-      if( object instanceof IContributionItem ) {

-        IContributionItem item = ( IContributionItem )object;

-        String id = item.getId();

-        if( id != null ) {

-          buffer.append( toolkit.createIdentifierSection( text,

-                                                          PDERuntimeMessages.get().ActiveMenuSection_0,

-                                                          new String[] {

-                                                            id

-                                                          } ) );

-        }

-        if( object instanceof ContributionItem ) {

-          createLocationURI( toolkit, object, text, buffer, id );

-        }

-        scan( item, buffer, toolkit, text );

-      }

-      buffer.append( "</form>" ); //$NON-NLS-1$

-      text.setText( buffer.toString(), true, false );

-    }

-  }

-

-  private void createLocationURI( SpyFormToolkit toolkit,

-                                  Object object,

-                                  FormText text,

-                                  StringBuffer buffer,

-                                  String id )

-  {

-    IContributionManager parent = ( ( ContributionItem )object ).getParent();

-    if( parent instanceof IMenuManager ) {

-      String parentId = ( ( IMenuManager )parent ).getId();

-      String locationURI = "menu:" + parentId + ( id == null ? "?after=additions" : "?after=" + id ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

-      buffer.append( toolkit.createIdentifierSection( text,

-                                                      PDERuntimeMessages.get().ActiveMenuSection_7,

-                                                      new String[] {

-                                                        locationURI

-                                                      } ) );

-    } else if( parent instanceof ToolBarManager ) {

-      ToolBar bar = ( ( ToolBarManager )parent ).getControl();

-      if( bar.getParent() instanceof CoolBar ) {

-        CoolItem[] items = ( ( CoolBar )bar.getParent() ).getItems();

-        for( int i = 0; i < items.length; i++ ) {

-          CoolItem coolItem = items[ i ];

-          if( coolItem.getControl() == bar ) {

-            Object o = coolItem.getData();

-            if( o instanceof ToolBarContributionItem ) {

-              String parentId = ( ( ToolBarContributionItem )o ).getId();

-              String locationURI = "toolbar:" + parentId + ( id == null ? "?after=additions" : "?after=" + id ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

-              buffer.append( toolkit.createIdentifierSection( text,

-                                                              PDERuntimeMessages.get().ActiveMenuSection_7,

-                                                              new String[] {

-                                                                locationURI

-                                                              } ) );

-            }

-            continue;

-          }

-        }

-      }

-    }

-  }

-

-  // FIXME this is a bit hackish but works... need to redo

-  private void scan( IContributionItem item,

-                     StringBuffer buffer,

-                     SpyFormToolkit toolkit,

-                     FormText text )

-  {

-    // check for action set information

-    if( item instanceof IActionSetContributionItem ) {

-      IActionSetContributionItem actionItem = ( IActionSetContributionItem )item;

-      buffer.append( toolkit.createIdentifierSection( text,

-                                                      PDERuntimeMessages.get().ActiveMenuSection_1,

-                                                      new String[] {

-                                                        actionItem.getActionSetId()

-                                                      } ) );

-    }

-    if( item instanceof ActionContributionItem ) {

-      createActionContributionItemText( item, buffer, toolkit, text );

-    } else if( item instanceof SubContributionItem ) {

-      SubContributionItem subItem = ( SubContributionItem )item;

-      scan( subItem.getInnerItem(), buffer, toolkit, text ); // recurse

-    } else if( item instanceof CommandContributionItem ) { // TODO... this is hard...

-      CommandContributionItem contributionItem = ( CommandContributionItem )item;

-      Command command = contributionItem.getCommand().getCommand();

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().ActiveMenuSection_2,

-                                                 new Class[] {

-                                                   command.getClass()

-                                                 } ) );

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().ActiveMenuSection_3,

-                                                 new Class[] {

-                                                   command.getHandler().getClass()

-                                                 } ) );

-    }

-  }

-

-  private void createActionContributionItemText( Object object,

-                                                 StringBuffer buffer,

-                                                 SpyFormToolkit toolkit,

-                                                 FormText text )

-  {

-    ActionContributionItem actionItem = ( ActionContributionItem )object;

-    IAction action = actionItem.getAction();

-    String id = action.getActionDefinitionId();

-    if( id != null ) {

-      buffer.append( toolkit.createIdentifierSection( text,

-                                                      PDERuntimeMessages.get().ActiveMenuSection_4,

-                                                      new String[] {

-                                                        action.getActionDefinitionId()

-                                                      } ) );

-    }

-    if( action instanceof PluginAction ) {

-      PluginAction pluginAction = ( PluginAction )action;

-      Class clazz = pluginAction.getClass();

-      createActionContributionItemText( object, buffer, toolkit, text, clazz, pluginAction );

-    } else {

-      // normal JFace Actions

-      Class clazz = action.getClass();

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().ActiveMenuSection_5,

-                                                 new Class[] {

-                                                   clazz

-                                                 } ) );

-      PackageAdmin admin = PDERuntimePlugin.getDefault().getPackageAdmin();

-      Bundle bundle = admin.getBundle( clazz );

-      toolkit.generatePluginDetailsText( bundle, null, "meow", buffer, text ); //$NON-NLS-1$

-    }

-  }

-

-  private void createActionContributionItemText( Object object,

-                                                 StringBuffer buffer,

-                                                 SpyFormToolkit toolkit,

-                                                 FormText text,

-                                                 Class clazz,

-                                                 PluginAction pluginAction )

-  {

-    try {

-      RetargetAction retargetAction = null;

-      IActionDelegate delegate = null;

-      if( pluginAction instanceof WWinPluginAction ) {

-        // such an action *may* have a retarget action

-        Field field = clazz.getDeclaredField( "retargetAction" ); //$NON-NLS-1$

-        field.setAccessible( true );

-        retargetAction = ( RetargetAction )field.get( pluginAction );

-      }

-      // if there's no retarget action OR if the pluginAction is not a WWinPluginAction, let's try

-// to find the action delegate

-      if( retargetAction == null ) {

-        Field field = clazz.getDeclaredField( "delegate" ); //$NON-NLS-1$

-        field.setAccessible( true );

-        delegate = ( IActionDelegate )field.get( pluginAction );

-        if( delegate == null ) { // have to invoke createDelegate if we don't have one yet...

-          Method method = clazz.getDeclaredMethod( "createDelegate", null ); //$NON-NLS-1$

-          method.setAccessible( true );

-          method.invoke( pluginAction, null );

-          delegate = ( IActionDelegate )field.get( pluginAction );

-        }

-      }

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().ActiveMenuSection_6,

-                                                 new Class[] {

-                                                   ( retargetAction == null )

-                                                                             ? delegate.getClass()

-                                                                             : retargetAction.getActionHandler()

-                                                                               .getClass()

-                                                 } ) );

-      PackageAdmin admin = PDERuntimePlugin.getDefault().getPackageAdmin();

-      Bundle bundle = admin.getBundle( clazz );

-      toolkit.generatePluginDetailsText( bundle, null, "menu item", buffer, text ); //$NON-NLS-1$

-    } catch( Exception e ) {

-      Class superclass = clazz.getSuperclass();

-      if( superclass != null ) {

-        createActionContributionItemText( object, buffer, toolkit, text, superclass, pluginAction );

-      }

-    }

-  }

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    // do nothing

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2009, 2015 EclipseSource 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     EclipseSource Corporation - initial API and implementation
+ *     Anyware Technologies - ongoing enhancements
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import org.eclipse.core.commands.Command;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.action.*;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.IActionDelegate;
+import org.eclipse.ui.actions.RetargetAction;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.internal.*;
+import org.eclipse.ui.menus.CommandContributionItem;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+
+/**
+ * @since 3.5
+ */
+public class ActiveMenuSection implements ISpySection {
+
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, Event event ) {
+    Object object = event.widget.getData();
+    if( object != null ) {
+      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+      section.clientVerticalSpacing = 9;
+      section.setText( PDERuntimeMessages.get().SpyDialog_activeSelection_title );
+      FormText text = toolkit.createFormText( section, true );
+      section.setClient( text );
+      TableWrapData td = new TableWrapData();
+      td.align = TableWrapData.FILL;
+      td.grabHorizontal = true;
+      section.setLayoutData( td );
+      StringBuffer buffer = new StringBuffer();
+      buffer.append( "<form>" ); //$NON-NLS-1$
+      if( object instanceof IContributionItem ) {
+        IContributionItem item = ( IContributionItem )object;
+        String id = item.getId();
+        if( id != null ) {
+          buffer.append( toolkit.createIdentifierSection( text,
+                                                          PDERuntimeMessages
+                                                            .get().ActiveMenuSection_0,
+                                                          new String[] {
+                                                            id
+          } ) );
+        }
+        if( object instanceof ContributionItem ) {
+          createLocationURI( toolkit, object, text, buffer, id );
+        }
+        scan( item, buffer, toolkit, text );
+      }
+      buffer.append( "</form>" ); //$NON-NLS-1$
+      text.setText( buffer.toString(), true, false );
+    }
+  }
+
+  private void createLocationURI( SpyFormToolkit toolkit,
+                                  Object object,
+                                  FormText text,
+                                  StringBuffer buffer,
+                                  String id )
+  {
+    IContributionManager parent = ( ( ContributionItem )object ).getParent();
+    if( parent instanceof IMenuManager ) {
+      String parentId = ( ( IMenuManager )parent ).getId();
+      String locationURI = "menu:" //$NON-NLS-1$
+                           + parentId
+                           + ( id == null
+                                          ? "?after=additions" //$NON-NLS-1$
+                                          : "?after=" + id ); //$NON-NLS-1$
+      buffer.append( toolkit
+        .createIdentifierSection( text, PDERuntimeMessages.get().ActiveMenuSection_7, new String[] {
+          locationURI
+      } ) );
+    } else if( parent instanceof ToolBarManager ) {
+      ToolBar bar = ( ( ToolBarManager )parent ).getControl();
+      if( bar.getParent() instanceof CoolBar ) {
+        CoolItem[] items = ( ( CoolBar )bar.getParent() ).getItems();
+        for( int i = 0; i < items.length; i++ ) {
+          CoolItem coolItem = items[ i ];
+          if( coolItem.getControl() == bar ) {
+            Object o = coolItem.getData();
+            if( o instanceof ToolBarContributionItem ) {
+              String parentId = ( ( ToolBarContributionItem )o ).getId();
+              String locationURI = "toolbar:" //$NON-NLS-1$
+                                   + parentId
+                                   + ( id == null
+                                                  ? "?after=additions" //$NON-NLS-1$
+                                                  : "?after=" + id ); //$NON-NLS-1$
+              buffer.append( toolkit.createIdentifierSection( text,
+                                                              PDERuntimeMessages
+                                                                .get().ActiveMenuSection_7,
+                                                              new String[] {
+                                                                locationURI
+              } ) );
+            }
+            continue;
+          }
+        }
+      }
+    }
+  }
+
+  // FIXME this is a bit hackish but works... need to redo
+  private void scan( IContributionItem item,
+                     StringBuffer buffer,
+                     SpyFormToolkit toolkit,
+                     FormText text )
+  {
+    // check for action set information
+    if( item instanceof IActionSetContributionItem ) {
+      IActionSetContributionItem actionItem = ( IActionSetContributionItem )item;
+      buffer.append( toolkit
+        .createIdentifierSection( text, PDERuntimeMessages.get().ActiveMenuSection_1, new String[] {
+          actionItem.getActionSetId()
+      } ) );
+    }
+    if( item instanceof ActionContributionItem ) {
+      createActionContributionItemText( item, buffer, toolkit, text );
+    } else if( item instanceof SubContributionItem ) {
+      SubContributionItem subItem = ( SubContributionItem )item;
+      scan( subItem.getInnerItem(), buffer, toolkit, text ); // recurse
+    } else if( item instanceof CommandContributionItem ) { // TODO... this is hard...
+      CommandContributionItem contributionItem = ( CommandContributionItem )item;
+      Command command = contributionItem.getCommand().getCommand();
+      buffer.append( toolkit
+        .createClassSection( text, PDERuntimeMessages.get().ActiveMenuSection_2, new Class[] {
+          command.getClass()
+      } ) );
+      buffer.append( toolkit
+        .createClassSection( text, PDERuntimeMessages.get().ActiveMenuSection_3, new Class[] {
+          command.getHandler().getClass()
+      } ) );
+    }
+  }
+
+  private void createActionContributionItemText( Object object,
+                                                 StringBuffer buffer,
+                                                 SpyFormToolkit toolkit,
+                                                 FormText text )
+  {
+    ActionContributionItem actionItem = ( ActionContributionItem )object;
+    IAction action = actionItem.getAction();
+    String id = action.getActionDefinitionId();
+    if( id != null ) {
+      buffer.append( toolkit
+        .createIdentifierSection( text, PDERuntimeMessages.get().ActiveMenuSection_4, new String[] {
+          action.getActionDefinitionId()
+      } ) );
+    }
+    if( action instanceof PluginAction ) {
+      PluginAction pluginAction = ( PluginAction )action;
+      Class clazz = pluginAction.getClass();
+      createActionContributionItemText( object, buffer, toolkit, text, clazz, pluginAction );
+    } else {
+      // normal JFace Actions
+      Class clazz = action.getClass();
+      buffer.append( toolkit
+        .createClassSection( text, PDERuntimeMessages.get().ActiveMenuSection_5, new Class[] {
+          clazz
+      } ) );
+      Bundle bundle = FrameworkUtil.getBundle( clazz );
+      toolkit.generatePluginDetailsText( bundle, null, "meow", buffer, text ); //$NON-NLS-1$
+    }
+  }
+
+  private void createActionContributionItemText( Object object,
+                                                 StringBuffer buffer,
+                                                 SpyFormToolkit toolkit,
+                                                 FormText text,
+                                                 Class clazz,
+                                                 PluginAction pluginAction )
+  {
+    try {
+      RetargetAction retargetAction = null;
+      IActionDelegate delegate = null;
+      if( pluginAction instanceof WWinPluginAction ) {
+        // such an action *may* have a retarget action
+        Field field = clazz.getDeclaredField( "retargetAction" ); //$NON-NLS-1$
+        field.setAccessible( true );
+        retargetAction = ( RetargetAction )field.get( pluginAction );
+      }
+      // if there's no retarget action OR if the pluginAction is not a WWinPluginAction, let's try
+      // to find the action delegate
+      if( retargetAction == null ) {
+        Field field = clazz.getDeclaredField( "delegate" ); //$NON-NLS-1$
+        field.setAccessible( true );
+        delegate = ( IActionDelegate )field.get( pluginAction );
+        if( delegate == null ) { // have to invoke createDelegate if we don't have one yet...
+          Method method = clazz.getDeclaredMethod( "createDelegate" ); //$NON-NLS-1$
+          method.setAccessible( true );
+          method.invoke( pluginAction );
+          delegate = ( IActionDelegate )field.get( pluginAction );
+        }
+      }
+      buffer.append( toolkit
+        .createClassSection( text, PDERuntimeMessages.get().ActiveMenuSection_6, new Class[] {
+          ( retargetAction == null )
+                                     ? delegate.getClass()
+                                     : retargetAction.getActionHandler().getClass()
+      } ) );
+      Bundle bundle = FrameworkUtil.getBundle( clazz );
+      toolkit.generatePluginDetailsText( bundle, null, "menu item", buffer, text ); //$NON-NLS-1$
+    } catch( Exception e ) {
+      Class superclass = clazz.getSuperclass();
+      if( superclass != null ) {
+        createActionContributionItemText( object, buffer, toolkit, text, superclass, pluginAction );
+      }
+    }
+  }
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    // do nothing
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
index a390037..5108a74 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActivePartSection.java
@@ -1,119 +1,124 @@
-/*******************************************************************************

- * Copyright (c) 2007, 2009 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *     Heiko Seeberger - changes for bug 237764

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import java.lang.reflect.Field;

-import java.util.*;

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.*;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.graphics.Image;

-import org.eclipse.ui.*;

-import org.eclipse.ui.forms.widgets.*;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.eclipse.ui.internal.PartSite;

-import org.eclipse.ui.internal.PopupMenuExtender;

-import org.eclipse.ui.part.IPage;

-import org.eclipse.ui.part.PageBookView;

-import org.osgi.framework.Bundle;

-

-

-/**

- * @since 3.4

- */

-public class ActivePartSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow( event );

-    if( window == null ) // if we don't have an active workbench, we don't have a valid selection to

-// analyze

-      return;

-    final IWorkbenchPart part = HandlerUtil.getActivePart( event );

-    if( part == null )

-      return; // (Bug 237764) if no active part let's do nothing ...

-    String partType = part instanceof IEditorPart

-                                                 ? "editor" : "view"; //$NON-NLS-1$ //$NON-NLS-2$

-    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-    section.setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activePart_title, part.getSite()

-      .getRegisteredName() ) );

-    FormText text = toolkit.createFormText( section, true );

-    section.setClient( text );

-    TableWrapData td = new TableWrapData();

-    td.align = TableWrapData.FILL;

-    td.grabHorizontal = true;

-    section.setLayoutData( td );

-    // toolkit.createImageAction(section, part.getTitleImage());

-    StringBuffer buffer = new StringBuffer();

-    buffer.append( "<form>" ); //$NON-NLS-1$

-    // time to analyze the active part

-    buffer.append( toolkit.createClassSection( text,

-                                               NLS.bind( PDERuntimeMessages.get().SpyDialog_activePart_desc,

-                                                         partType ),

-                                               new Class[] {

-                                                 part.getClass()

-                                               } ) );

-    if( part instanceof PageBookView ) {

-      PageBookView outline = ( PageBookView )part;

-      IPage currentPage = outline.getCurrentPage();

-      if( currentPage != null ) {

-        buffer.append( toolkit.createClassSection( text,

-                                                   PDERuntimeMessages.get().SpyDialog_activePageBook_title,

-                                                   new Class[] {

-                                                     currentPage.getClass()

-                                                   } ) );

-      }

-    }

-    // time to analyze the contributing plug-in

-    final Bundle bundle = Platform.getBundle( part.getSite().getPluginId() );

-    toolkit.generatePluginDetailsText( bundle, part.getSite().getId(), partType, buffer, text );

-    // get menu information using reflection

-    try {

-      PartSite site = ( PartSite )part.getSite();

-      Class clazz = site.getClass().getSuperclass();

-      Field field = clazz.getDeclaredField( "menuExtenders" ); //$NON-NLS-1$

-      field.setAccessible( true );

-      List list = ( List )field.get( site );

-      if( list != null && list.size() > 0 ) {

-        Set menuIds = new LinkedHashSet();

-        for( int i = 0; i < list.size(); i++ ) {

-          PopupMenuExtender extender = ( PopupMenuExtender )list.get( i );

-          menuIds.addAll( extender.getMenuIds() );

-        }

-        buffer.append( "<p>" ); //$NON-NLS-1$

-        buffer.append( PDERuntimeMessages.get().SpyDialog_activeMenuIds );

-        buffer.append( "</p>" ); //$NON-NLS-1$

-        for( Iterator it = menuIds.iterator(); it.hasNext(); ) {

-          buffer.append( "<li bindent=\"20\" style=\"image\" value=\"menu\">" ); //$NON-NLS-1$

-          buffer.append( it.next().toString() );

-          buffer.append( "</li>" ); //$NON-NLS-1$

-        }

-        Image menuImage = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_MENU_OBJ );

-        text.setImage( "menu", menuImage ); //$NON-NLS-1$

-      }

-    } catch( SecurityException e ) {

-      PDERuntimePlugin.log( e );

-    } catch( NoSuchFieldException e ) {

-      PDERuntimePlugin.log( e );

-    } catch( IllegalArgumentException e ) {

-      PDERuntimePlugin.log( e );

-    } catch( IllegalAccessException e ) {

-      PDERuntimePlugin.log( e );

-    }

-    buffer.append( "</form>" ); //$NON-NLS-1$

-    Image idImage = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_ID_OBJ );

-    text.setImage( "id", idImage ); //$NON-NLS-1$

-    text.setText( buffer.toString(), true, false );

-    text.layout();

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2007, 2009 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Heiko Seeberger - changes for bug 237764
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import java.lang.reflect.Field;
+import java.util.*;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.*;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.*;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.ui.internal.PartSite;
+import org.eclipse.ui.internal.PopupMenuExtender;
+import org.eclipse.ui.part.IPage;
+import org.eclipse.ui.part.PageBookView;
+import org.osgi.framework.Bundle;
+
+
+/**
+ * @since 3.4
+ */
+public class ActivePartSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow( event );
+    if( window == null ) // if we don't have an active workbench, we don't have a valid selection to
+                         // analyze
+      return;
+    final IWorkbenchPart part = HandlerUtil.getActivePart( event );
+    if( part == null )
+      return; // (Bug 237764) if no active part let's do nothing ...
+    String partType = part instanceof IEditorPart
+                                                  ? "editor" //$NON-NLS-1$
+                                                  : "view"; //$NON-NLS-1$
+    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+    section.setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activePart_title,
+                               part.getSite().getRegisteredName() ) );
+    FormText text = toolkit.createFormText( section, true );
+    section.setClient( text );
+    TableWrapData td = new TableWrapData();
+    td.align = TableWrapData.FILL;
+    td.grabHorizontal = true;
+    section.setLayoutData( td );
+    // toolkit.createImageAction(section, part.getTitleImage());
+    StringBuffer buffer = new StringBuffer();
+    buffer.append( "<form>" ); //$NON-NLS-1$
+    // time to analyze the active part
+    buffer
+      .append( toolkit.createClassSection( text,
+                                           NLS.bind( PDERuntimeMessages
+                                             .get().SpyDialog_activePart_desc, partType ),
+                                           new Class[] {
+                                             part.getClass()
+    } ) );
+    if( part instanceof PageBookView ) {
+      PageBookView outline = ( PageBookView )part;
+      IPage currentPage = outline.getCurrentPage();
+      if( currentPage != null ) {
+        buffer.append( toolkit.createClassSection( text,
+                                                   PDERuntimeMessages
+                                                     .get().SpyDialog_activePageBook_title,
+                                                   new Class[] {
+                                                     currentPage.getClass()
+        } ) );
+      }
+    }
+    // time to analyze the contributing plug-in
+    final Bundle bundle = Platform.getBundle( part.getSite().getPluginId() );
+    toolkit.generatePluginDetailsText( bundle, part.getSite().getId(), partType, buffer, text );
+    // get menu information using reflection
+    try {
+      PartSite site = ( PartSite )part.getSite();
+      Class clazz = site.getClass().getSuperclass();
+      Field field = clazz.getDeclaredField( "menuExtenders" ); //$NON-NLS-1$
+      field.setAccessible( true );
+      List list = ( List )field.get( site );
+      if( list != null && list.size() > 0 ) {
+        Set menuIds = new LinkedHashSet();
+        for( int i = 0; i < list.size(); i++ ) {
+          PopupMenuExtender extender = ( PopupMenuExtender )list.get( i );
+          menuIds.addAll( extender.getMenuIds() );
+        }
+        buffer.append( "<p>" ); //$NON-NLS-1$
+        buffer.append( PDERuntimeMessages.get().SpyDialog_activeMenuIds );
+        buffer.append( "</p>" ); //$NON-NLS-1$
+        for( Iterator it = menuIds.iterator(); it.hasNext(); ) {
+          buffer.append( "<li bindent=\"20\" style=\"image\" value=\"menu\">" ); //$NON-NLS-1$
+          buffer.append( it.next().toString() );
+          buffer.append( "</li>" ); //$NON-NLS-1$
+        }
+        Image menuImage = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_MENU_OBJ );
+        text.setImage( "menu", menuImage ); //$NON-NLS-1$
+      }
+    } catch( SecurityException e ) {
+      PDERuntimePlugin.log( e );
+    } catch( NoSuchFieldException e ) {
+      PDERuntimePlugin.log( e );
+    } catch( IllegalArgumentException e ) {
+      PDERuntimePlugin.log( e );
+    } catch( IllegalAccessException e ) {
+      PDERuntimePlugin.log( e );
+    }
+    buffer.append( "</form>" ); //$NON-NLS-1$
+    Image idImage = PDERuntimePluginImages.get( PDERuntimePluginImages.IMG_ID_OBJ );
+    text.setImage( "id", idImage ); //$NON-NLS-1$
+    text.setText( buffer.toString(), true, false );
+    text.layout();
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
index 086c781..04d2f33 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveSelectionSection.java
@@ -1,84 +1,91 @@
-/*******************************************************************************

- * Copyright (c) 2007, 20012 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.jface.viewers.ISelection;

-import org.eclipse.jface.viewers.IStructuredSelection;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.IWorkbenchWindow;

-import org.eclipse.ui.forms.widgets.*;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-/**

- * @since 3.4

- */

-public class ActiveSelectionSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow( event );

-    if( window == null ) // if we don't have an active workbench, we don't have a valid selection to

-// analyze

-      return;

-    // analyze the selection

-    ISelection selection = HandlerUtil.getCurrentSelection( event );

-    Shell shell = HandlerUtil.getActiveShell( event );

-    if( selection != null && window.getShell() == shell ) {

-      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-      section.clientVerticalSpacing = 9;

-      section.setText( PDERuntimeMessages.get().SpyDialog_activeSelection_title );

-      FormText text = toolkit.createFormText( section, true );

-      section.setClient( text );

-      TableWrapData td = new TableWrapData();

-      td.align = TableWrapData.FILL;

-      td.grabHorizontal = true;

-      section.setLayoutData( td );

-      // time to analyze the selection

-      Class clazz = selection.getClass();

-      StringBuffer buffer = new StringBuffer();

-      buffer.append( "<form>" ); //$NON-NLS-1$

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().SpyDialog_activeSelection_desc,

-                                                 new Class[] {

-                                                   clazz

-                                                 } ) );

-      Class[] interfaces = clazz.getInterfaces();

-      buffer.append( toolkit.createInterfaceSection( text,

-                                                     PDERuntimeMessages.get().SpyDialog_activeSelectionInterfaces_desc,

-                                                     interfaces ) );

-      if( selection instanceof IStructuredSelection ) {

-        IStructuredSelection ss = ( IStructuredSelection )selection;

-        int size = ss.size();

-        if( size == 1 ) {

-          clazz = ss.getFirstElement().getClass();

-          buffer.append( toolkit.createClassSection( text,

-                                                     PDERuntimeMessages.get().SpyDialog_activeSelectedElement_desc,

-                                                     new Class[] {

-                                                       clazz

-                                                     } ) );

-          interfaces = clazz.getInterfaces();

-          buffer.append( toolkit.createInterfaceSection( text,

-                                                         PDERuntimeMessages.get().SpyDialog_activeSelectedElementInterfaces_desc,

-                                                         interfaces ) );

-        } else if( size > 1 ) {

-          buffer.append( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeSelectedElementsCount_desc,

-                                   new Integer( size ) ) );

-        }

-      }

-      buffer.append( "</form>" ); //$NON-NLS-1$

-      text.setText( buffer.toString(), true, false );

-    }

-  }

-}

+/*******************************************************************************
+ * Copyright (c) 2007, 2012 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+
+/**
+ * @since 3.4
+ */
+public class ActiveSelectionSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow( event );
+    if( window == null ) // if we don't have an active workbench, we don't have a valid selection to
+                         // analyze
+      return;
+    // analyze the selection
+    ISelection selection = HandlerUtil.getCurrentSelection( event );
+    Shell shell = HandlerUtil.getActiveShell( event );
+    if( selection != null && window.getShell() == shell ) {
+      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+      section.clientVerticalSpacing = 9;
+      section.setText( PDERuntimeMessages.get().SpyDialog_activeSelection_title );
+      FormText text = toolkit.createFormText( section, true );
+      section.setClient( text );
+      TableWrapData td = new TableWrapData();
+      td.align = TableWrapData.FILL;
+      td.grabHorizontal = true;
+      section.setLayoutData( td );
+      // time to analyze the selection
+      Class clazz = selection.getClass();
+      StringBuffer buffer = new StringBuffer();
+      buffer.append( "<form>" ); //$NON-NLS-1$
+      buffer.append( toolkit.createClassSection( text,
+                                                 PDERuntimeMessages
+                                                   .get().SpyDialog_activeSelection_desc,
+                                                 new Class[] {
+                                                   clazz
+      } ) );
+      Class[] interfaces = clazz.getInterfaces();
+      buffer.append( toolkit.createInterfaceSection( text,
+                                                     PDERuntimeMessages
+                                                       .get().SpyDialog_activeSelectionInterfaces_desc,
+                                                     interfaces ) );
+      if( selection instanceof IStructuredSelection ) {
+        IStructuredSelection ss = ( IStructuredSelection )selection;
+        int size = ss.size();
+        if( size == 1 ) {
+          clazz = ss.getFirstElement().getClass();
+          buffer.append( toolkit.createClassSection( text,
+                                                     PDERuntimeMessages
+                                                       .get().SpyDialog_activeSelectedElement_desc,
+                                                     new Class[] {
+                                                       clazz
+          } ) );
+          interfaces = clazz.getInterfaces();
+          buffer.append( toolkit.createInterfaceSection( text,
+                                                         PDERuntimeMessages
+                                                           .get().SpyDialog_activeSelectedElementInterfaces_desc,
+                                                         interfaces ) );
+        } else if( size > 1 ) {
+          buffer
+            .append( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeSelectedElementsCount_desc,
+                               new Integer( size ) ) );
+        }
+      }
+      buffer.append( "</form>" ); //$NON-NLS-1$
+      text.setText( buffer.toString(), true, false );
+    }
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveShellSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveShellSection.java
index 9f134cb..043def9 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveShellSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveShellSection.java
@@ -1,55 +1,52 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.forms.widgets.ExpandableComposite;

-import org.eclipse.ui.forms.widgets.FormText;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.Section;

-import org.eclipse.ui.forms.widgets.TableWrapData;

-import org.eclipse.ui.handlers.HandlerUtil;

-

-

-/**

- * @since 3.4

- */

-public class ActiveShellSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    final Shell shell = HandlerUtil.getActiveShell( event );

-    Object object = shell.getData();

-    if( object == null )

-      return;

-    Class clazz = object.getClass();

-    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-    section.clientVerticalSpacing = 9;

-    section.setText( PDERuntimeMessages.get().SpyDialog_activeShell_title );

-    FormText text = toolkit.createFormText( section, true );

-    section.setClient( text );

-    TableWrapData td = new TableWrapData();

-    td.align = TableWrapData.FILL;

-    td.grabHorizontal = true;

-    section.setLayoutData( td );

-    StringBuffer buffer = new StringBuffer();

-    buffer.append( "<form>" ); //$NON-NLS-1$

-    buffer.append( toolkit.createClassSection( text,

-                                               PDERuntimeMessages.get().SpyDialog_activeShell_desc,

-                                               new Class[] {

-                                                 clazz

-                                               } ) );

-    buffer.append( "</form>" ); //$NON-NLS-1$

-    text.setText( buffer.toString(), true, false );

-  }

-}

+/*******************************************************************************
+ *  Copyright (c) 2007, 2008 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+
+/**
+ * @since 3.4
+ */
+public class ActiveShellSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    final Shell shell = HandlerUtil.getActiveShell( event );
+    Object object = shell.getData();
+    if( object == null )
+      return;
+    Class clazz = object.getClass();
+    Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+    section.clientVerticalSpacing = 9;
+    section.setText( PDERuntimeMessages.get().SpyDialog_activeShell_title );
+    FormText text = toolkit.createFormText( section, true );
+    section.setClient( text );
+    TableWrapData td = new TableWrapData();
+    td.align = TableWrapData.FILL;
+    td.grabHorizontal = true;
+    section.setLayoutData( td );
+    StringBuffer buffer = new StringBuffer();
+    buffer.append( "<form>" ); //$NON-NLS-1$
+    buffer.append( toolkit
+      .createClassSection( text, PDERuntimeMessages.get().SpyDialog_activeShell_desc, new Class[] {
+        clazz
+    } ) );
+    buffer.append( "</form>" ); //$NON-NLS-1$
+    text.setText( buffer.toString(), true, false );
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveWizardSection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveWizardSection.java
index 62cf0fe..ff8fbc2 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveWizardSection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ActiveWizardSection.java
@@ -1,73 +1,68 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.jface.wizard.IWizard;

-import org.eclipse.jface.wizard.IWizardPage;

-import org.eclipse.jface.wizard.WizardDialog;

-import org.eclipse.osgi.util.NLS;

-import org.eclipse.pde.internal.runtime.PDERuntimeMessages;

-import org.eclipse.pde.internal.runtime.PDERuntimePlugin;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.swt.widgets.Shell;

-import org.eclipse.ui.forms.widgets.ExpandableComposite;

-import org.eclipse.ui.forms.widgets.FormText;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-import org.eclipse.ui.forms.widgets.Section;

-import org.eclipse.ui.forms.widgets.TableWrapData;

-import org.eclipse.ui.handlers.HandlerUtil;

-import org.osgi.framework.Bundle;

-import org.osgi.service.packageadmin.PackageAdmin;

-

-

-/**

- * @since 3.4

- */

-public class ActiveWizardSection implements ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {

-    final Shell shell = HandlerUtil.getActiveShell( event );

-    Object object = shell.getData();

-    if( object == null )

-      return;

-    Class clazz = object.getClass();

-    if( object instanceof WizardDialog ) {

-      WizardDialog dialog = ( WizardDialog )object;

-      IWizardPage page = dialog.getCurrentPage();

-      IWizard wizard = page.getWizard();

-      clazz = wizard.getClass();

-      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );

-      section.clientVerticalSpacing = 9;

-      // the active wizard

-      FormText text = toolkit.createFormText( section, true );

-      section.setClient( text );

-      TableWrapData td = new TableWrapData();

-      td.align = TableWrapData.FILL;

-      td.grabHorizontal = true;

-      section.setLayoutData( td );

-      StringBuffer buffer = new StringBuffer();

-      buffer.append( "<form>" ); //$NON-NLS-1$

-      section.setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeWizard_title,

-                                 wizard.getWindowTitle() ) );

-      buffer.append( toolkit.createClassSection( text,

-                                                 PDERuntimeMessages.get().SpyDialog_activeWizard_desc,

-                                                 new Class[] {

-                                                   clazz

-                                                 } ) );

-      PackageAdmin admin = PDERuntimePlugin.getDefault().getPackageAdmin();

-      Bundle bundle = admin.getBundle( clazz );

-      toolkit.generatePluginDetailsText( bundle, null, "wizard", buffer, text ); //$NON-NLS-1$

-      buffer.append( "</form>" ); //$NON-NLS-1$

-      text.setText( buffer.toString(), true, false );

-    }

-  }

-}

+/*******************************************************************************
+ *  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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.jface.wizard.*;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.pde.internal.runtime.PDERuntimeMessages;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.forms.widgets.*;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.FrameworkUtil;
+
+
+/**
+ * @since 3.4
+ */
+public class ActiveWizardSection implements ISpySection {
+
+  @Override
+  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event ) {
+    final Shell shell = HandlerUtil.getActiveShell( event );
+    Object object = shell.getData();
+    if( object == null )
+      return;
+    Class clazz = object.getClass();
+    if( object instanceof WizardDialog ) {
+      WizardDialog dialog = ( WizardDialog )object;
+      IWizardPage page = dialog.getCurrentPage();
+      IWizard wizard = page.getWizard();
+      clazz = wizard.getClass();
+      Section section = toolkit.createSection( form.getBody(), ExpandableComposite.TITLE_BAR );
+      section.clientVerticalSpacing = 9;
+      // the active wizard
+      FormText text = toolkit.createFormText( section, true );
+      section.setClient( text );
+      TableWrapData td = new TableWrapData();
+      td.align = TableWrapData.FILL;
+      td.grabHorizontal = true;
+      section.setLayoutData( td );
+      StringBuffer buffer = new StringBuffer();
+      buffer.append( "<form>" ); //$NON-NLS-1$
+      section.setText( NLS.bind( PDERuntimeMessages.get().SpyDialog_activeWizard_title,
+                                 wizard.getWindowTitle() ) );
+      buffer.append( toolkit.createClassSection( text,
+                                                 PDERuntimeMessages
+                                                   .get().SpyDialog_activeWizard_desc,
+                                                 new Class[] {
+                                                   clazz
+      } ) );
+      Bundle bundle = FrameworkUtil.getBundle( clazz );
+      toolkit.generatePluginDetailsText( bundle, null, "wizard", buffer, text ); //$NON-NLS-1$
+      buffer.append( "</form>" ); //$NON-NLS-1$
+      text.setText( buffer.toString(), true, false );
+    }
+  }
+}
diff --git a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ISpySection.java b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ISpySection.java
index 529a38a..7eb7761 100644
--- a/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ISpySection.java
+++ b/bundles/org.eclipse.rap.pde.runtime/src/org/eclipse/pde/internal/runtime/spy/sections/ISpySection.java
@@ -1,24 +1,24 @@
-/*******************************************************************************

- * Copyright (c) 2007, 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation

- *******************************************************************************/

-package org.eclipse.pde.internal.runtime.spy.sections;

-

-import org.eclipse.core.commands.ExecutionEvent;

-import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;

-import org.eclipse.ui.forms.widgets.ScrolledForm;

-

-

-/**

- * @since 3.4

- */

-public interface ISpySection {

-

-  public void build( ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event );

-}

+/*******************************************************************************
+ * Copyright (c) 2007, 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Chris Aniszczyk <zx@us.ibm.com> - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.pde.internal.runtime.spy.sections;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.pde.internal.runtime.spy.SpyFormToolkit;
+import org.eclipse.ui.forms.widgets.ScrolledForm;
+
+/**
+ * @since 3.4
+ */
+public interface ISpySection {
+
+	public void build(ScrolledForm form, SpyFormToolkit toolkit, ExecutionEvent event);
+
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/.classpath b/bundles/org.eclipse.rap.ui.views.log/.classpath
index f1b3ad8..121e527 100644
--- a/bundles/org.eclipse.rap.ui.views.log/.classpath
+++ b/bundles/org.eclipse.rap.ui.views.log/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<classpath>

-	<classpathentry kind="src" path="src"/>

-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/>

-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

-	<classpathentry kind="output" path="bin"/>

-</classpath>

+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.core.resources.prefs b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.core.resources.prefs
index 1dbea0b..fc21a08 100644
--- a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.core.resources.prefs
+++ b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.core.resources.prefs
@@ -1,7 +1,6 @@
-#Fri Oct 20 13:22:13 EDT 2006

-eclipse.preferences.version=1

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/default.permissions=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/implied.permissions=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/osname.aliases=UTF-8

-encoding//core/framework/org/eclipse/osgi/framework/internal/core/processor.aliases=UTF-8

-encoding/<project>=ISO-8859-1

+eclipse.preferences.version=1
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/default.permissions=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/implied.permissions=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/osname.aliases=UTF-8
+encoding//core/framework/org/eclipse/osgi/framework/internal/core/processor.aliases=UTF-8
+encoding/<project>=UTF-8
diff --git a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.core.prefs
index 74d58dd..14d2b58 100644
--- a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.core.prefs
+++ b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.core.prefs
@@ -7,6 +7,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.codeComplete.argumentPrefixes=
 org.eclipse.jdt.core.codeComplete.argumentSuffixes=
 org.eclipse.jdt.core.codeComplete.fieldPrefixes=
@@ -15,32 +16,24 @@
 org.eclipse.jdt.core.codeComplete.localSuffixes=
 org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
 org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
-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=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+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
-org.eclipse.jdt.core.compiler.compliance=1.4
+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=1000
 org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
 org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
 org.eclipse.jdt.core.compiler.problem.deprecation=warning
 org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
 org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
 org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
-org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
 org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
 org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
 org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
@@ -48,18 +41,14 @@
 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.incompleteEnumSwitch=error
 org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
 org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning
 org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private
 org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
 org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
-org.eclipse.jdt.core.compiler.problem.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
 org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
@@ -67,37 +56,24 @@
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
 org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=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.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=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.redundantNullAnnotation=warning
 org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
 org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
-org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
 org.eclipse.jdt.core.compiler.problem.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.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=warning
 org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
 org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
@@ -105,13 +81,11 @@
 org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
 org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
 org.eclipse.jdt.core.compiler.problem.unusedImport=error
 org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
 org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
 org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
 org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
@@ -119,9 +93,10 @@
 org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error
 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.source=1.6
 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=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
@@ -132,15 +107,18 @@
 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=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=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
@@ -160,26 +138,33 @@
 org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
 org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
 org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=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=false
-org.eclipse.jdt.core.formatter.comment.format_line_comments=false
+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=false
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=false
+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.insert_new_line_for_parameter=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
@@ -189,10 +174,17 @@
 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.indent_switchstatements_compare_to_switch=false
 org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
 org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
@@ -200,7 +192,7 @@
 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=do not 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
@@ -211,7 +203,7 @@
 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_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
 org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
@@ -240,10 +232,11 @@
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
 org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
 org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=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
@@ -258,12 +251,14 @@
 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
@@ -272,7 +267,7 @@
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_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
@@ -287,11 +282,12 @@
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_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=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
@@ -314,6 +310,7 @@
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
 org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
@@ -342,6 +339,7 @@
 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
@@ -351,6 +349,7 @@
 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
@@ -360,19 +359,25 @@
 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=800
+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=true
+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=false
+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
+org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter
diff --git a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.ui.prefs b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.ui.prefs
index 345668a..5625e78 100644
--- a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.ui.prefs
+++ b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.jdt.ui.prefs
@@ -1,64 +1,71 @@
-#Sun Dec 30 18:01:47 CST 2007

-eclipse.preferences.version=1

-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true

-formatter_profile=_core

-formatter_settings_version=11

-org.eclipse.jdt.ui.exception.name=e

-org.eclipse.jdt.ui.gettersetter.use.is=true

-org.eclipse.jdt.ui.ignorelowercasenames=true

-org.eclipse.jdt.ui.importorder=;

-org.eclipse.jdt.ui.keywordthis=false

-org.eclipse.jdt.ui.ondemandthreshold=3

-org.eclipse.jdt.ui.overrideannotation=false

-org.eclipse.jdt.ui.staticondemandthreshold=99

-org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>

-sp_cleanup.add_default_serial_version_id=true

-sp_cleanup.add_generated_serial_version_id=false

-sp_cleanup.add_missing_annotations=true

-sp_cleanup.add_missing_deprecated_annotations=true

-sp_cleanup.add_missing_methods=false

-sp_cleanup.add_missing_nls_tags=false

-sp_cleanup.add_missing_override_annotations=true

-sp_cleanup.add_serial_version_id=false

-sp_cleanup.always_use_blocks=true

-sp_cleanup.always_use_parentheses_in_expressions=false

-sp_cleanup.always_use_this_for_non_static_field_access=false

-sp_cleanup.always_use_this_for_non_static_method_access=false

-sp_cleanup.convert_to_enhanced_for_loop=false

-sp_cleanup.correct_indentation=false

-sp_cleanup.format_source_code=true

-sp_cleanup.format_source_code_changes_only=false

-sp_cleanup.make_local_variable_final=false

-sp_cleanup.make_parameters_final=false

-sp_cleanup.make_private_fields_final=true

-sp_cleanup.make_variable_declarations_final=true

-sp_cleanup.never_use_blocks=false

-sp_cleanup.never_use_parentheses_in_expressions=true

-sp_cleanup.on_save_use_additional_actions=false

-sp_cleanup.organize_imports=true

-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false

-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true

-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true

-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false

-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false

-sp_cleanup.remove_private_constructors=true

-sp_cleanup.remove_trailing_whitespaces=false

-sp_cleanup.remove_trailing_whitespaces_all=true

-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false

-sp_cleanup.remove_unnecessary_casts=true

-sp_cleanup.remove_unnecessary_nls_tags=false

-sp_cleanup.remove_unused_imports=false

-sp_cleanup.remove_unused_local_variables=false

-sp_cleanup.remove_unused_private_fields=true

-sp_cleanup.remove_unused_private_members=false

-sp_cleanup.remove_unused_private_methods=true

-sp_cleanup.remove_unused_private_types=true

-sp_cleanup.sort_members=false

-sp_cleanup.sort_members_all=false

-sp_cleanup.use_blocks=false

-sp_cleanup.use_blocks_only_for_return_and_throw=false

-sp_cleanup.use_parentheses_in_expressions=false

-sp_cleanup.use_this_for_non_static_field_access=false

-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true

-sp_cleanup.use_this_for_non_static_method_access=false

-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=org.eclipse.jdt.ui.default.eclipse_profile
+formatter_settings_version=12
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=;
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ondemandthreshold=3
+org.eclipse.jdt.ui.overrideannotation=false
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=false
+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=false
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_functional_interfaces=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.insert_inferred_type_arguments=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_redundant_type_arguments=false
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_anonymous_class_creation=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_lambda=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
+sp_cleanup.use_type_arguments=false
diff --git a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.pde.prefs b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.pde.prefs
index 0a9b231..88a12c6 100644
--- a/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.pde.prefs
+++ b/bundles/org.eclipse.rap.ui.views.log/.settings/org.eclipse.pde.prefs
@@ -1,28 +1,34 @@
-#Mon Dec 14 12:09:28 CST 2009

-compilers.f.unresolved-features=1

-compilers.f.unresolved-plugins=1

-compilers.incompatible-environment=1

-compilers.p.build=1

-compilers.p.build.missing.output=1

-compilers.p.deprecated=1

-compilers.p.discouraged-class=1

-compilers.p.internal=1

-compilers.p.missing-bundle-classpath-entries=1

-compilers.p.missing-packages=0

-compilers.p.missing-version-export-package=2

-compilers.p.missing-version-import-package=2

-compilers.p.missing-version-require-bundle=2

-compilers.p.no-required-att=0

-compilers.p.not-externalized-att=0

-compilers.p.unknown-attribute=1

-compilers.p.unknown-class=0

-compilers.p.unknown-element=1

-compilers.p.unknown-identifier=1

-compilers.p.unknown-resource=0

-compilers.p.unresolved-ex-points=0

-compilers.p.unresolved-import=0

-compilers.s.create-docs=false

-compilers.s.doc-folder=doc

-compilers.s.open-tags=1

-compilers.use-project=true

-eclipse.preferences.version=1

+compilers.f.unresolved-features=1
+compilers.f.unresolved-plugins=1
+compilers.incompatible-environment=0
+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=1
+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.matching-pom-version=0
+compilers.p.missing-packages=0
+compilers.p.missing-version-export-package=2
+compilers.p.missing-version-import-package=2
+compilers.p.missing-version-require-bundle=2
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=1
+compilers.p.unknown-attribute=1
+compilers.p.unknown-class=1
+compilers.p.unknown-element=1
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=1
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.s.create-docs=false
+compilers.s.doc-folder=doc
+compilers.s.open-tags=1
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/bundles/org.eclipse.rap.ui.views.log/build.properties b/bundles/org.eclipse.rap.ui.views.log/build.properties
index 3c07e23..a204574 100644
--- a/bundles/org.eclipse.rap.ui.views.log/build.properties
+++ b/bundles/org.eclipse.rap.ui.views.log/build.properties
@@ -1,19 +1,19 @@
-###############################################################################

-#  Copyright (c) 2005, 2007 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

-#  http://www.eclipse.org/legal/epl-v10.html

-# 

-#  Contributors:

-#      IBM Corporation - initial API and implementation

-###############################################################################

-source.. = src/

-output.. = bin/

-bin.includes = META-INF/,\

-               .,\

-               plugin.xml,\

-               plugin.properties,\

-               icons/,\

-               about.html

-src.includes = about.html

+###############################################################################
+#  Copyright (c) 2005, 2007 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
+#  http://www.eclipse.org/legal/epl-v10.html
+# 
+#  Contributors:
+#      IBM Corporation - initial API and implementation
+###############################################################################
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               plugin.properties,\
+               icons/,\
+               about.html
+src.includes = about.html
diff --git a/bundles/org.eclipse.rap.ui.views.log/plugin.xml b/bundles/org.eclipse.rap.ui.views.log/plugin.xml
index 1b1bf13..f492263 100644
--- a/bundles/org.eclipse.rap.ui.views.log/plugin.xml
+++ b/bundles/org.eclipse.rap.ui.views.log/plugin.xml
@@ -1,53 +1,76 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<?eclipse version="3.2"?><!--

-     Copyright (c) 2005, 2008 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

-     http://www.eclipse.org/legal/epl-v10.html

-    

-     Contributors:

-         IBM Corporation - initial API and implementation

- -->

-

-<plugin>

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            name="%views.errorLog.name"

-            icon="$nl$/icons/eview16/error_log.gif"

-            category="org.eclipse.ui"

-            class="org.eclipse.ui.internal.views.log.LogView"

-            id="org.eclipse.pde.runtime.LogView">

-      </view>

-   </extension>

-   <extension

-         point="org.eclipse.ui.bindings">

-      <key

-            commandId="org.eclipse.ui.views.showView"

-            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"

-            sequence="M2+M3+Q L">

-         <parameter

-               id="org.eclipse.ui.views.showView.viewId"

-               value="org.eclipse.pde.runtime.LogView">

-         </parameter>

-      </key>

-   </extension>

-   <extension

-         point="org.eclipse.core.contenttype.contentTypes">

-       <content-type

-            base-type="org.eclipse.core.runtime.text"

-            file-extensions="log"

-            id="log"

-            name="%content-type.name.log"

-            priority="high">

-      </content-type>

-   </extension>

-   <extension

-         point="org.eclipse.rap.ui.serviceHandler">

-      <serviceHandler

-            class="org.eclipse.ui.internal.views.log.DownloadServiceHandler"

-            id="org.eclipse.rap.ui.view.log.downloadLogFile">

-      </serviceHandler>

-   </extension>

-</plugin>

+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.2"?><!--
+     Copyright (c) 2005, 2008 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
+     http://www.eclipse.org/legal/epl-v10.html
+    
+     Contributors:
+         IBM Corporation - initial API and implementation
+ -->
+
+<plugin>
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            name="%views.errorLog.name"
+            icon="$nl$/icons/eview16/error_log.gif"
+            category="org.eclipse.ui"
+            class="org.eclipse.ui.internal.views.log.LogView"
+            id="org.eclipse.pde.runtime.LogView">
+      </view>
+   </extension>
+   <extension
+         point="org.eclipse.ui.perspectiveExtensions">
+      <perspectiveExtension
+            targetID="org.eclipse.ui.resourcePerspective">
+         <viewShortcut
+               id="org.eclipse.pde.runtime.LogView">
+         </viewShortcut>
+      </perspectiveExtension>
+      <perspectiveExtension
+            targetID="org.eclipse.pde.ui.PDEPerspective">
+         <viewShortcut
+               id="org.eclipse.pde.runtime.LogView">
+         </viewShortcut>
+      </perspectiveExtension>
+   </extension>
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="org.eclipse.ui.views.showView"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M2+M3+Q L">
+         <parameter
+               id="org.eclipse.ui.views.showView.viewId"
+               value="org.eclipse.pde.runtime.LogView">
+         </parameter>
+      </key>
+      <key
+            platform="carbon"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M2+M3+Q L">
+      </key>
+      <key
+            platform="carbon"
+            commandId="org.eclipse.ui.views.showView"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+M3+Q L">
+         <parameter
+               id="org.eclipse.ui.views.showView.viewId"
+               value="org.eclipse.pde.runtime.LogView">
+         </parameter>
+      </key>
+   </extension>
+   <extension
+         point="org.eclipse.core.contenttype.contentTypes">
+       <content-type
+            base-type="org.eclipse.core.runtime.text"
+            file-extensions="log"
+            id="log"
+            name="%content-type.name.log"
+            priority="high">
+      </content-type>
+   </extension>
+</plugin>
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/AbstractEntry.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/AbstractEntry.java
index 13d2644..02f53c4 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/AbstractEntry.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/AbstractEntry.java
@@ -1,119 +1,123 @@
-/*******************************************************************************

- * Copyright (c) 2007 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 207344

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.io.PrintWriter;

-import java.util.ArrayList;

-import java.util.List;

-import org.eclipse.core.runtime.PlatformObject;

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.ui.model.IWorkbenchAdapter;

-

-/**

- * Everything that appears in LogView is Abstract Entry. It provides composite pattern.

- */

-public abstract class AbstractEntry extends PlatformObject implements IWorkbenchAdapter {

-

-	/**

-	 * The collection of direct children of this entry

-	 */

-	private List children = new ArrayList();

-	protected Object parent;

-

-	/**

-	 * Adds the specified child entry to the listing of children.

-	 * If the specified child is <code>null</code>, no work is done

-	 * 

-	 * @param child

-	 */

-	public void addChild(AbstractEntry child) {

-		if (child != null) {

-			children.add(0, child);

-			child.setParent(this);

-		}

-	}

-

-	/**

-	 * @see IWorkbenchAdapter#getChildren(Object)

-	 */

-	public Object[] getChildren(Object parent) {

-		return children.toArray();

-	}

-

-	/**

-	 * @return true if this entry has children, false otherwise

-	 */

-	public boolean hasChildren() {

-		return children.size() > 0;

-	}

-

-	/**

-	 * @return the size of the child array

-	 * 

-	 * TODO rename to getChildCount(), or something more meaningful

-	 */

-	public int size() {

-		return children.size();

-	}

-

-	/**

-	 * @see IWorkbenchAdapter#getImageDescriptor(Object)

-	 */

-	public ImageDescriptor getImageDescriptor(Object object) {

-		return null;

-	}

-

-	/**

-	 * @see IWorkbenchAdapter#getLabel(Object)

-	 */

-	public String getLabel(Object o) {

-		return null;

-	}

-

-	/**

-	 * @see IWorkbenchAdapter#getParent(Object)

-	 */

-	public Object getParent(Object o) {

-		return parent;

-	}

-

-	/**

-	 * Sets the parent of this entry

-	 * @param parent

-	 */

-	public void setParent(AbstractEntry parent) {

-		this.parent = parent;

-	}

-

-	/**

-	 * removes all of the children specified in the given listing

-	 * 

-	 * @param list the list of children to remove

-	 */

-	public void removeChildren(List list) {

-		children.removeAll(list);

-	}

-

-	/**

-	 * Removes all of the children from this entry

-	 */

-	public void removeAllChildren() {

-		children.clear();

-	}

-

-	/**

-	 * Writes this entry information into the given {@link PrintWriter}

-	 * 

-	 * @param writer

-	 */

-	public abstract void write(PrintWriter writer);

-}

+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 207344
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.List;
+import org.eclipse.core.runtime.PlatformObject;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.model.IWorkbenchAdapter;
+
+/**
+ * Everything that appears in LogView is Abstract Entry. It provides composite pattern.
+ */
+public abstract class AbstractEntry extends PlatformObject implements IWorkbenchAdapter {
+
+	/**
+	 * The collection of direct children of this entry
+	 */
+	private List children = new ArrayList();
+	protected Object parent;
+
+	/**
+	 * Adds the specified child entry to the listing of children.
+	 * If the specified child is <code>null</code>, no work is done
+	 *
+	 * @param child
+	 */
+	public void addChild(AbstractEntry child) {
+		if (child != null) {
+			children.add(0, child);
+			child.setParent(this);
+		}
+	}
+
+	/**
+	 * @see IWorkbenchAdapter#getChildren(Object)
+	 */
+	@Override
+	public Object[] getChildren(Object parent) {
+		return children.toArray();
+	}
+
+	/**
+	 * @return true if this entry has children, false otherwise
+	 */
+	public boolean hasChildren() {
+		return children.size() > 0;
+	}
+
+	/**
+	 * @return the size of the child array
+	 *
+	 * TODO rename to getChildCount(), or something more meaningful
+	 */
+	public int size() {
+		return children.size();
+	}
+
+	/**
+	 * @see IWorkbenchAdapter#getImageDescriptor(Object)
+	 */
+	@Override
+	public ImageDescriptor getImageDescriptor(Object object) {
+		return null;
+	}
+
+	/**
+	 * @see IWorkbenchAdapter#getLabel(Object)
+	 */
+	@Override
+	public String getLabel(Object o) {
+		return null;
+	}
+
+	/**
+	 * @see IWorkbenchAdapter#getParent(Object)
+	 */
+	@Override
+	public Object getParent(Object o) {
+		return parent;
+	}
+
+	/**
+	 * Sets the parent of this entry
+	 * @param parent
+	 */
+	public void setParent(AbstractEntry parent) {
+		this.parent = parent;
+	}
+
+	/**
+	 * removes all of the children specified in the given listing
+	 *
+	 * @param list the list of children to remove
+	 */
+	public void removeChildren(List list) {
+		children.removeAll(list);
+	}
+
+	/**
+	 * Removes all of the children from this entry
+	 */
+	public void removeAllChildren() {
+		children.clear();
+	}
+
+	/**
+	 * Writes this entry information into the given {@link PrintWriter}
+	 *
+	 * @param writer
+	 */
+	public abstract void write(PrintWriter writer);
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Activator.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Activator.java
index 0890ef9..fa6d160 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Activator.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Activator.java
@@ -1,91 +1,86 @@
-/*******************************************************************************

- * Copyright (c) 2007 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 202583

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import org.eclipse.jface.resource.ImageDescriptor;

-import org.eclipse.jface.resource.ImageRegistry;

-import org.eclipse.ui.plugin.AbstractUIPlugin;

-import org.osgi.framework.BundleContext;

-

-/**

- * The activator class controls the plug-in life cycle

- */

-public class Activator extends AbstractUIPlugin {

-

-	// The plug-in ID

-	public static final String PLUGIN_ID = "org.eclipse.rap.ui.views.log"; //$NON-NLS-1$

-

-	// The shared instance

-	private static Activator plugin;

-

-	/**

-	 * The constructor

-	 */

-	public Activator() { // do nothing

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)

-	 */

-	public void start(BundleContext context) throws Exception {

-		super.start(context);

-		plugin = this;

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)

-	 */

-	public void stop(BundleContext context) throws Exception {

-		plugin = null;

-		super.stop(context);

-	}

-

-	public static Activator getDefault() {

-		return plugin;

-	}

-

-	protected void initializeImageRegistry(ImageRegistry registry) {

-		registry.put(SharedImages.DESC_PREV_EVENT, createImageDescriptor(SharedImages.DESC_PREV_EVENT));

-		registry.put(SharedImages.DESC_NEXT_EVENT, createImageDescriptor(SharedImages.DESC_NEXT_EVENT));

-

-		registry.put(SharedImages.DESC_ERROR_ST_OBJ, createImageDescriptor(SharedImages.DESC_ERROR_ST_OBJ));

-		registry.put(SharedImages.DESC_ERROR_STACK_OBJ, createImageDescriptor(SharedImages.DESC_ERROR_STACK_OBJ));

-		registry.put(SharedImages.DESC_INFO_ST_OBJ, createImageDescriptor(SharedImages.DESC_INFO_ST_OBJ));

-		registry.put(SharedImages.DESC_OK_ST_OBJ, createImageDescriptor(SharedImages.DESC_OK_ST_OBJ));

-		registry.put(SharedImages.DESC_WARNING_ST_OBJ, createImageDescriptor(SharedImages.DESC_WARNING_ST_OBJ));

-		registry.put(SharedImages.DESC_HIERARCHICAL_LAYOUT_OBJ, createImageDescriptor(SharedImages.DESC_HIERARCHICAL_LAYOUT_OBJ));

-

-		registry.put(SharedImages.DESC_CLEAR, createImageDescriptor(SharedImages.DESC_CLEAR));

-		registry.put(SharedImages.DESC_CLEAR_DISABLED, createImageDescriptor(SharedImages.DESC_CLEAR_DISABLED));

-		registry.put(SharedImages.DESC_REMOVE_LOG, createImageDescriptor(SharedImages.DESC_REMOVE_LOG));

-		registry.put(SharedImages.DESC_REMOVE_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_REMOVE_LOG_DISABLED));

-		registry.put(SharedImages.DESC_EXPORT, createImageDescriptor(SharedImages.DESC_EXPORT));

-		registry.put(SharedImages.DESC_EXPORT_DISABLED, createImageDescriptor(SharedImages.DESC_EXPORT_DISABLED));

-		registry.put(SharedImages.DESC_FILTER, createImageDescriptor(SharedImages.DESC_FILTER));

-		registry.put(SharedImages.DESC_FILTER_DISABLED, createImageDescriptor(SharedImages.DESC_FILTER_DISABLED));

-		registry.put(SharedImages.DESC_IMPORT, createImageDescriptor(SharedImages.DESC_IMPORT));

-		registry.put(SharedImages.DESC_IMPORT_DISABLED, createImageDescriptor(SharedImages.DESC_IMPORT_DISABLED));

-		registry.put(SharedImages.DESC_OPEN_LOG, createImageDescriptor(SharedImages.DESC_OPEN_LOG));

-		registry.put(SharedImages.DESC_OPEN_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_OPEN_LOG_DISABLED));

-		registry.put(SharedImages.DESC_PROPERTIES, createImageDescriptor(SharedImages.DESC_PROPERTIES));

-		registry.put(SharedImages.DESC_PROPERTIES_DISABLED, createImageDescriptor(SharedImages.DESC_PROPERTIES_DISABLED));

-		registry.put(SharedImages.DESC_READ_LOG, createImageDescriptor(SharedImages.DESC_READ_LOG));

-		registry.put(SharedImages.DESC_READ_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_READ_LOG_DISABLED));

-	}

-

-	private ImageDescriptor createImageDescriptor(String id) {

-		return imageDescriptorFromPlugin(PLUGIN_ID, id);

-	}

-

-}

+/*******************************************************************************
+ * Copyright (c) 2007 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bug 202583
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+	// The plug-in ID
+	public static final String PLUGIN_ID = "org.eclipse.ui.views.log"; //$NON-NLS-1$
+
+	// The shared instance
+	private static Activator plugin;
+
+	/**
+	 * The constructor
+	 */
+	public Activator() { // do nothing
+	}
+
+	@Override
+	public void start(BundleContext context) throws Exception {
+		super.start(context);
+		plugin = this;
+	}
+
+	@Override
+	public void stop(BundleContext context) throws Exception {
+		plugin = null;
+		super.stop(context);
+	}
+
+	public static Activator getDefault() {
+		return plugin;
+	}
+
+	@Override
+	protected void initializeImageRegistry(ImageRegistry registry) {
+		registry.put(SharedImages.DESC_PREV_EVENT, createImageDescriptor(SharedImages.DESC_PREV_EVENT));
+		registry.put(SharedImages.DESC_NEXT_EVENT, createImageDescriptor(SharedImages.DESC_NEXT_EVENT));
+
+		registry.put(SharedImages.DESC_ERROR_ST_OBJ, createImageDescriptor(SharedImages.DESC_ERROR_ST_OBJ));
+		registry.put(SharedImages.DESC_ERROR_STACK_OBJ, createImageDescriptor(SharedImages.DESC_ERROR_STACK_OBJ));
+		registry.put(SharedImages.DESC_INFO_ST_OBJ, createImageDescriptor(SharedImages.DESC_INFO_ST_OBJ));
+		registry.put(SharedImages.DESC_OK_ST_OBJ, createImageDescriptor(SharedImages.DESC_OK_ST_OBJ));
+		registry.put(SharedImages.DESC_WARNING_ST_OBJ, createImageDescriptor(SharedImages.DESC_WARNING_ST_OBJ));
+		registry.put(SharedImages.DESC_HIERARCHICAL_LAYOUT_OBJ, createImageDescriptor(SharedImages.DESC_HIERARCHICAL_LAYOUT_OBJ));
+
+		registry.put(SharedImages.DESC_CLEAR, createImageDescriptor(SharedImages.DESC_CLEAR));
+		registry.put(SharedImages.DESC_CLEAR_DISABLED, createImageDescriptor(SharedImages.DESC_CLEAR_DISABLED));
+		registry.put(SharedImages.DESC_REMOVE_LOG, createImageDescriptor(SharedImages.DESC_REMOVE_LOG));
+		registry.put(SharedImages.DESC_REMOVE_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_REMOVE_LOG_DISABLED));
+		registry.put(SharedImages.DESC_EXPORT, createImageDescriptor(SharedImages.DESC_EXPORT));
+		registry.put(SharedImages.DESC_EXPORT_DISABLED, createImageDescriptor(SharedImages.DESC_EXPORT_DISABLED));
+		registry.put(SharedImages.DESC_FILTER, createImageDescriptor(SharedImages.DESC_FILTER));
+		registry.put(SharedImages.DESC_FILTER_DISABLED, createImageDescriptor(SharedImages.DESC_FILTER_DISABLED));
+		registry.put(SharedImages.DESC_IMPORT, createImageDescriptor(SharedImages.DESC_IMPORT));
+		registry.put(SharedImages.DESC_IMPORT_DISABLED, createImageDescriptor(SharedImages.DESC_IMPORT_DISABLED));
+		registry.put(SharedImages.DESC_OPEN_LOG, createImageDescriptor(SharedImages.DESC_OPEN_LOG));
+		registry.put(SharedImages.DESC_OPEN_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_OPEN_LOG_DISABLED));
+		registry.put(SharedImages.DESC_PROPERTIES, createImageDescriptor(SharedImages.DESC_PROPERTIES));
+		registry.put(SharedImages.DESC_PROPERTIES_DISABLED, createImageDescriptor(SharedImages.DESC_PROPERTIES_DISABLED));
+		registry.put(SharedImages.DESC_READ_LOG, createImageDescriptor(SharedImages.DESC_READ_LOG));
+		registry.put(SharedImages.DESC_READ_LOG_DISABLED, createImageDescriptor(SharedImages.DESC_READ_LOG_DISABLED));
+	}
+
+	private ImageDescriptor createImageDescriptor(String id) {
+		return imageDescriptorFromPlugin(PLUGIN_ID, id);
+	}
+
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
index 60f2261..e75de97 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialog.java
@@ -1,845 +1,851 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2011 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207466, 207344

- *     Remy Chi Jian Suen <remy.suen@gmail.com> - bug 272985

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.text.Collator;

-import java.text.DateFormat;

-import java.util.*;

-import java.util.List;

-import org.eclipse.core.runtime.IAdaptable;

-import org.eclipse.jface.dialogs.*;

-import org.eclipse.jface.dialogs.Dialog;

-import org.eclipse.jface.viewers.*;

-import org.eclipse.jface.window.Window;

-import org.eclipse.rap.rwt.RWT;

-import org.eclipse.swt.SWT;

-import org.eclipse.swt.accessibility.AccessibleAdapter;

-import org.eclipse.swt.accessibility.AccessibleEvent;

-import org.eclipse.swt.custom.SashForm;

-import org.eclipse.swt.events.SelectionAdapter;

-import org.eclipse.swt.events.SelectionEvent;

-import org.eclipse.swt.graphics.Point;

-import org.eclipse.swt.layout.GridData;

-import org.eclipse.swt.layout.GridLayout;

-import org.eclipse.swt.widgets.*;

-import org.eclipse.ui.IMemento;

-import org.eclipse.ui.PlatformUI;

-

-/**

- * Displays details about Log Entry.

- * Event information is split in three sections: details, stack trace and session. Details

- * contain event date, message and severity. Stack trace is displayed if an exception is bound

- * to event. Stack trace entries can be filtered.

- */

-public class EventDetailsDialog extends TrayDialog {

-

-	public static final String FILTER_ENABLED = "detailsStackFilterEnabled"; //$NON-NLS-1$

-	public static final String FILTER_LIST = "detailsStackFilterList"; //$NON-NLS-1$

-

-	private IMemento memento;

-

-	private AbstractEntry entry;

-	private AbstractEntry parentEntry; // parent of the entry

-	private AbstractEntry[] entryChildren; // children of the entry

-

-	private LogViewLabelProvider labelProvider;

-	private TreeViewer provider;

-

-//	private static int COPY_ID = 22;

-

-	private int childIndex = 0;

-	private boolean isOpen;

-	private boolean isLastChild;

-	private boolean isAtEndOfLog;

-

-	private Label dateLabel;

-	private Label severityImageLabel;

-	private Label severityLabel;

-	private Text msgText;

-	private Text stackTraceText;

-	private Text sessionDataText;

-//	private Clipboard clipboard;

-//	private Button copyButton;

-	private Button backButton;

-	private Button nextButton;

-	private SashForm sashForm;

-

-	// sorting

-	private Comparator comparator = null;

-	Collator collator;

-

-	// patterns for filtering stack traces

-	private String[] stackFilterPatterns = null;

-

-	// location configuration

-	private Point dialogLocation;

-	private Point dialogSize;

-	private int[] sashWeights;

-

-	private DateFormat dateFormat;

-

-	/**

-	 * 

-	 * @param parentShell shell in which dialog is displayed

-	 * @param selection entry initially selected and to be displayed

-	 * @param provider viewer

-	 * @param comparator comparator used to order all entries

-	 */

-	protected EventDetailsDialog(Shell parentShell, IAdaptable selection, ISelectionProvider provider, Comparator comparator, IMemento memento) {

-		super(parentShell);

-		dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, RWT.getLocale());

-		this.provider = (TreeViewer) provider;

-		labelProvider = (LogViewLabelProvider) this.provider.getLabelProvider();

-		labelProvider.connect(this);

-		this.entry = (AbstractEntry) selection;

-		this.comparator = comparator;

-		this.memento = memento;

-		setShellStyle(SWT.MODELESS | SWT.MIN | SWT.MAX | SWT.RESIZE | SWT.CLOSE | SWT.BORDER | SWT.TITLE);

-//		clipboard = new Clipboard(parentShell.getDisplay());

-		initialize();

-		collator = Collator.getInstance();

-		readConfiguration();

-		isLastChild = false;

-		isAtEndOfLog = false;

-		stackFilterPatterns = getFilters();

-	}

-

-	/*

-	 * @see org.eclipse.jface.window.Window#configureShell(Shell)

-	 */

-	protected void configureShell(Shell newShell) {

-		super.configureShell(newShell);

-		PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IHelpContextIds.LOG_EVENTDETAILS);

-	}

-

-	private void initialize() {

-		parentEntry = (AbstractEntry) entry.getParent(entry);

-		if (isChild(entry)) {

-			setEntryChildren(parentEntry);

-		} else {

-			setEntryChildren();

-		}

-		resetChildIndex();

-		isLastChild = false;

-		isAtEndOfLog = false;

-	}

-

-	private void resetChildIndex() {

-		if (entryChildren == null)

-			return;

-

-		LogEntry thisEntry = (LogEntry) entry;

-

-		for (int i = 0; i < entryChildren.length; i++) {

-			if (entryChildren[i] instanceof LogEntry) {

-

-				LogEntry logEntry = (LogEntry) entryChildren[i];

-

-				if (logEntry == thisEntry) {

-					childIndex = i;

-					return;

-				}

-			}

-		}

-

-		childIndex = 0;

-	}

-

-	private boolean isChild(AbstractEntry entry) {

-		return entry.getParent(entry) != null;

-	}

-

-	public boolean isOpen() {

-		return isOpen;

-	}

-

-	public int open() {

-		isOpen = true;

-		if (sashWeights == null) {

-			int a, b, c;

-			int height = getSashForm().getClientArea().height;

-			if (height < 250) {

-				a = b = c = height / 3;

-			} else {

-				a = 100; // Details section needs about 100

-				c = 100; // Text area gets 100

-				b = height - a - c; // Stack trace should take up majority of room 

-			}

-			sashWeights = new int[] {a, b, c};

-		}

-		getSashForm().setWeights(sashWeights);

-		return super.open();

-	}

-

-	public boolean close() {

-//		if (clipboard != null) {

-//			clipboard.dispose();

-//			clipboard = null;

-//		}

-		storeSettings();

-		isOpen = false;

-		labelProvider.disconnect(this);

-		return super.close();

-	}

-

-	public void create() {

-		super.create();

-

-		// dialog location 

-		if (dialogLocation != null)

-			getShell().setLocation(dialogLocation);

-

-		// dialog size

-		if (dialogSize != null)

-			getShell().setSize(dialogSize);

-		else

-			getShell().setSize(500, 550);

-

-		applyDialogFont(buttonBar);

-		getButton(IDialogConstants.OK_ID).setFocus();

-	}

-

-	protected void buttonPressed(int buttonId) {

-		if (IDialogConstants.OK_ID == buttonId)

-			okPressed();

-		else if (IDialogConstants.CANCEL_ID == buttonId)

-			cancelPressed();

-		else if (IDialogConstants.BACK_ID == buttonId)

-			backPressed();

-		else if (IDialogConstants.NEXT_ID == buttonId)

-			nextPressed();

-//		else if (COPY_ID == buttonId)

-//			copyPressed();

-	}

-

-	protected void backPressed() {

-		if (childIndex > 0) {

-			if (isLastChild && (isChild(entry))) {

-				setEntryChildren(parentEntry);

-				isLastChild = false;

-			}

-			childIndex--;

-			entry = entryChildren[childIndex];

-		} else {

-			if (parentEntry instanceof LogEntry) {

-				entry = parentEntry;

-				if (isChild(entry)) {

-					setEntryChildren((AbstractEntry) entry.getParent(entry));

-				} else {

-					setEntryChildren();

-				}

-				resetChildIndex();

-			}

-		}

-		setEntrySelectionInTable();

-	}

-

-	protected void nextPressed() {

-		if (childIndex < entryChildren.length - 1) {

-			childIndex++;

-			entry = entryChildren[childIndex];

-			isLastChild = childIndex == entryChildren.length - 1;

-		} else if (isChild(entry) && isLastChild && !isAtEndOfLog) {

-			findNextSelectedChild(entry);

-		} else { // at end of list but can branch into child elements - bug 58083

-			setEntryChildren(entry);

-			entry = entryChildren[0];

-			isAtEndOfLog = entryChildren.length == 0;

-			isLastChild = entryChildren.length == 0;

-		}

-		setEntrySelectionInTable();

-	}

-

-//	protected void copyPressed() {

-//		StringWriter writer = new StringWriter();

-//		PrintWriter pwriter = new PrintWriter(writer);

-//

-//		entry.write(pwriter);

-//		pwriter.flush();

-//		String textVersion = writer.toString();

-//		try {

-//			pwriter.close();

-//			writer.close();

-//		} catch (IOException e) { // do nothing

-//		}

-//		// set the clipboard contents

-//		clipboard.setContents(new Object[] {textVersion}, new Transfer[] {TextTransfer.getInstance()});

-//	}

-

-	public void setComparator(Comparator comparator) {

-		this.comparator = comparator;

-		updateProperties();

-	}

-

-	private void setComparator(byte sortType, final int sortOrder) {

-		if (sortType == LogView.DATE) {

-			comparator = new Comparator() {

-				public int compare(Object e1, Object e2) {

-					Date date1 = ((LogEntry) e1).getDate();

-					Date date2 = ((LogEntry) e2).getDate();

-					if (sortOrder == LogView.ASCENDING)

-						return date1.getTime() < date2.getTime() ? LogView.DESCENDING : LogView.ASCENDING;

-					return date1.getTime() > date2.getTime() ? LogView.DESCENDING : LogView.ASCENDING;

-				}

-			};

-		} else if (sortType == LogView.PLUGIN) {

-			comparator = new Comparator() {

-				public int compare(Object e1, Object e2) {

-					LogEntry entry1 = (LogEntry) e1;

-					LogEntry entry2 = (LogEntry) e2;

-					return collator.compare(entry1.getPluginId(), entry2.getPluginId()) * sortOrder;

-				}

-			};

-		} else {

-			comparator = new Comparator() {

-				public int compare(Object e1, Object e2) {

-					LogEntry entry1 = (LogEntry) e1;

-					LogEntry entry2 = (LogEntry) e2;

-					return collator.compare(entry1.getMessage(), entry2.getMessage()) * sortOrder;

-				}

-			};

-		}

-	}

-

-	public void resetSelection(IAdaptable selectedEntry, byte sortType, int sortOrder) {

-		setComparator(sortType, sortOrder);

-		resetSelection(selectedEntry);

-	}

-

-	public void resetSelection(IAdaptable selectedEntry) {

-		if (entry.equals(selectedEntry)) {

-			updateProperties();

-			return;

-		}

-		if (selectedEntry instanceof AbstractEntry) {

-			entry = (AbstractEntry) selectedEntry;

-			initialize();

-			updateProperties();

-		}

-	}

-

-	public void resetButtons() {

-		backButton.setEnabled(false);

-		nextButton.setEnabled(false);

-	}

-

-	private void setEntrySelectionInTable() {

-		ISelection selection = new StructuredSelection(entry);

-		provider.setSelection(selection);

-	}

-

-	public void updateProperties() {

-		if (isChild(entry)) {

-			parentEntry = (AbstractEntry) entry.getParent(entry);

-			setEntryChildren(parentEntry);

-			resetChildIndex();

-			if (childIndex == entryChildren.length - 1)

-				isLastChild = true;

-		}

-

-		if (entry instanceof LogEntry) {

-			LogEntry logEntry = (LogEntry) entry;

-

-			String strDate = dateFormat.format(logEntry.getDate());

-			dateLabel.setText(strDate);

-			severityImageLabel.setImage(labelProvider.getColumnImage(entry, 0));

-			severityLabel.setText(logEntry.getSeverityText());

-			msgText.setText(logEntry.getMessage() != null ? logEntry.getMessage() : ""); //$NON-NLS-1$

-			String stack = logEntry.getStack();

-

-			if (stack != null) {

-				stack = filterStack(stack);

-				stackTraceText.setText(stack);

-			} else {

-				stackTraceText.setText(Messages.get().EventDetailsDialog_noStack);

-			}

-

-			if (logEntry.getSession() != null) {

-				String session = logEntry.getSession().getSessionData();

-				if (session != null) {

-					sessionDataText.setText(session);

-				}

-			}

-

-		} else {

-			dateLabel.setText(""); //$NON-NLS-1$

-			severityImageLabel.setImage(null);

-			severityLabel.setText(""); //$NON-NLS-1$

-			msgText.setText(""); //$NON-NLS-1$

-			stackTraceText.setText(""); //$NON-NLS-1$

-			sessionDataText.setText(""); //$NON-NLS-1$

-		}

-

-		updateButtons();

-	}

-

-	private void updateButtons() {

-		boolean isAtEnd = childIndex == entryChildren.length - 1;

-		if (isChild(entry)) {

-			boolean canGoToParent = (entry.getParent(entry) instanceof LogEntry);

-			backButton.setEnabled((childIndex > 0) || canGoToParent);

-			nextButton.setEnabled(nextChildExists(entry, parentEntry, entryChildren) || entry.hasChildren() || !isLastChild || !isAtEnd);

-		} else {

-			backButton.setEnabled(childIndex != 0);

-			nextButton.setEnabled(!isAtEnd || entry.hasChildren());

-		}

-	}

-

-	private void findNextSelectedChild(AbstractEntry originalEntry) {

-		if (isChild(parentEntry)) {

-			// we're at the end of the child list; find next parent

-			// to select.  If the parent is a child at the end of the child

-			// list, find its next parent entry to select, etc.

-

-			entry = parentEntry;

-			setEntryChildren((AbstractEntry) parentEntry.getParent(parentEntry));

-			parentEntry = (AbstractEntry) parentEntry.getParent(parentEntry);

-			resetChildIndex();

-			isLastChild = childIndex == entryChildren.length - 1;

-			if (isLastChild) {

-				findNextSelectedChild(originalEntry);

-			} else {

-				nextPressed();

-			}

-		} else if (parentEntry instanceof LogEntry) {

-			entry = parentEntry;

-			setEntryChildren();

-			resetChildIndex();

-			isLastChild = childIndex == entryChildren.length - 1;

-			if (isLastChild) {

-				if (isChild(entry)) {

-					findNextSelectedChild(originalEntry);

-				} else {

-					entry = originalEntry;

-					isAtEndOfLog = true;

-					nextPressed();

-				}

-			} else {

-				nextPressed();

-			}

-		} else {

-			entry = originalEntry;

-			isAtEndOfLog = true;

-			nextPressed();

-		}

-	}

-

-	private boolean nextChildExists(AbstractEntry originalEntry, AbstractEntry originalParent, AbstractEntry[] originalEntries) {

-		if (isChild(parentEntry)) {

-			// we're at the end of the child list; find next parent

-			// to select.  If the parent is a child at the end of the child

-			// list, find its next parent entry to select, etc.

-

-			entry = parentEntry;

-			parentEntry = (AbstractEntry) entry.getParent(entry);

-			setEntryChildren(parentEntry);

-			resetChildIndex();

-			if (childIndex == entryChildren.length - 1) {

-				return nextChildExists(originalEntry, originalParent, originalEntries);

-			}

-			entry = originalEntry;

-			parentEntry = originalParent;

-			entryChildren = originalEntries;

-			resetChildIndex();

-			return true;

-		} else if (parentEntry instanceof LogEntry) {

-			entry = parentEntry;

-			setEntryChildren();

-			childIndex = -1;

-			resetChildIndex();

-			if ((childIndex != -1) && (childIndex < entryChildren.length - 1)) {

-				entry = originalEntry;

-				parentEntry = originalParent;

-				entryChildren = originalEntries;

-				resetChildIndex();

-				return true;

-			}

-		}

-		entry = originalEntry;

-		parentEntry = originalParent;

-		entryChildren = originalEntries;

-		resetChildIndex();

-		return false;

-

-	}

-

-	/**

-	 * Sets entry children (Prev-Next navigable) to top-level elements

-	 */

-	private void setEntryChildren() {

-		AbstractEntry[] children = getElements();

-

-		if (comparator != null)

-			Arrays.sort(children, comparator);

-		entryChildren = new AbstractEntry[children.length];

-

-		System.arraycopy(children, 0, entryChildren, 0, children.length);

-	}

-

-	/**

-	 * Sets entry children (Prev-Next navigable) to children of given entry

-	 */

-	private void setEntryChildren(AbstractEntry entry) {

-		Object[] children = entry.getChildren(entry);

-

-		if (comparator != null)

-			Arrays.sort(children, comparator);

-

-		List result = new ArrayList();

-		for (int i = 0; i < children.length; i++) {

-			if (children[i] instanceof AbstractEntry) {

-				result.add(children[i]);

-			}

-		}

-

-		entryChildren = (AbstractEntry[]) result.toArray(new AbstractEntry[result.size()]);

-	}

-

-	public SashForm getSashForm() {

-		return sashForm;

-	}

-

-	protected Control createDialogArea(Composite parent) {

-		Composite container = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout();

-		layout.numColumns = 1;

-		container.setLayout(layout);

-		GridData gd = new GridData(GridData.FILL_BOTH);

-		container.setLayoutData(gd);

-

-		createSashForm(container);

-		createDetailsSection(getSashForm());

-		createStackSection(getSashForm());

-		createSessionSection(getSashForm());

-

-		updateProperties();

-		Dialog.applyDialogFont(container);

-		return container;

-	}

-

-	private void createSashForm(Composite parent) {

-		sashForm = new SashForm(parent, SWT.VERTICAL);

-		GridLayout layout = new GridLayout();

-		layout.marginHeight = layout.marginWidth = 0;

-		sashForm.setLayout(layout);

-		sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));

-		sashForm.setSashWidth(10);

-	}

-

-	private void createToolbarButtonBar(Composite parent) {

-		Composite comp = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout();

-		layout.marginWidth = layout.marginHeight = 0;

-		//layout.numColumns = 1;

-		comp.setLayout(layout);

-		comp.setLayoutData(new GridData(GridData.FILL_VERTICAL));

-		((GridData) comp.getLayoutData()).verticalAlignment = SWT.BOTTOM;

-

-		Composite container = new Composite(comp, SWT.NONE);

-		layout = new GridLayout();

-		layout.marginWidth = 0;

-		layout.marginHeight = 0;

-		container.setLayout(layout);

-		container.setLayoutData(new GridData(GridData.FILL_BOTH));

-

-		backButton = createButton(container, IDialogConstants.BACK_ID, "", false); //$NON-NLS-1$

-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);

-		backButton.setLayoutData(gd);

-		backButton.setToolTipText(Messages.get().EventDetailsDialog_previous);

-		backButton.setImage(SharedImages.getImage(SharedImages.DESC_PREV_EVENT));

-		backButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {

-			public void getName(AccessibleEvent e) {

-				e.result = Messages.get().EventDetailsDialog_previous;

-			}

-		});

-

-//		copyButton = createButton(container, COPY_ID, "", false); //$NON-NLS-1$

-//		gd = new GridData();

-//		copyButton.setLayoutData(gd);

-//		copyButton.setImage(PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_TOOL_COPY));

-//		copyButton.setToolTipText(Messages.get().EventDetailsDialog_copy);

-//		copyButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {

-//			public void getName(AccessibleEvent e) {

-//				e.result = Messages.get().EventDetailsDialog_copy;

-//			}

-//		});

-

-		nextButton = createButton(container, IDialogConstants.NEXT_ID, "", false); //$NON-NLS-1$

-		gd = new GridData();

-		nextButton.setLayoutData(gd);

-		nextButton.setToolTipText(Messages.get().EventDetailsDialog_next);

-		nextButton.setImage(SharedImages.getImage(SharedImages.DESC_NEXT_EVENT));

-		nextButton.getAccessible().addAccessibleListener(new AccessibleAdapter() {

-			public void getName(AccessibleEvent e) {

-				e.result = Messages.get().EventDetailsDialog_next;

-			}

-		});

-

-		Button button = new Button(container, SWT.NONE);

-		button.setToolTipText(Messages.get().EventDetailsDialog_ShowFilterDialog);

-		button.setImage(SharedImages.getImage(SharedImages.DESC_FILTER));

-		gd = new GridData();

-		gd.horizontalAlignment = SWT.RIGHT;

-		button.setLayoutData(gd);

-		button.addSelectionListener(new SelectionAdapter() {

-			public void widgetSelected(SelectionEvent e) {

-				FilterDialog dialog = new FilterDialog(getShell(), memento);

-				dialog.create();

-				dialog.getShell().setText(Messages.get().EventDetailsDialog_FilterDialog);

-				if (dialog.open() == Window.OK)

-					// update filters and currently displayed stack trace

-					stackFilterPatterns = getFilters();

-				updateProperties();

-			}

-		});

-		button.getAccessible().addAccessibleListener(new AccessibleAdapter() {

-			public void getName(AccessibleEvent e) {

-				e.result = Messages.get().EventDetailsDialog_FilterDialog;

-			}

-		});

-

-		// set numColumns at the end, after all createButton() calls, which change this value

-		layout.numColumns = 2;

-	}

-

-	protected void createButtonsForButtonBar(Composite parent) {

-		// create OK button only by default

-		createButton(parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true);

-	}

-

-	private void createDetailsSection(Composite parent) {

-		Composite container = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout();

-		layout.marginWidth = layout.marginHeight = 0;

-		layout.numColumns = 2;

-		container.setLayout(layout);

-		GridData data = new GridData(GridData.FILL_HORIZONTAL);

-		data.heightHint = 200;

-		container.setLayoutData(data);

-

-		createTextSection(container);

-		createToolbarButtonBar(container);

-	}

-

-	private void createTextSection(Composite parent) {

-		Composite textContainer = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout();

-		layout.numColumns = 3;

-		layout.marginHeight = layout.marginWidth = 0;

-		textContainer.setLayout(layout);

-		textContainer.setLayoutData(new GridData(GridData.FILL_BOTH));

-

-		Label label = new Label(textContainer, SWT.NONE);

-		label.setText(Messages.get().EventDetailsDialog_date);

-		dateLabel = new Label(textContainer, SWT.NULL);

-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);

-		gd.horizontalSpan = 2;

-		dateLabel.setLayoutData(gd);

-

-		label = new Label(textContainer, SWT.NONE);

-		label.setText(Messages.get().EventDetailsDialog_severity);

-		severityImageLabel = new Label(textContainer, SWT.NULL);

-		severityLabel = new Label(textContainer, SWT.NULL);

-		gd = new GridData(GridData.FILL_HORIZONTAL);

-		severityLabel.setLayoutData(gd);

-

-		label = new Label(textContainer, SWT.NONE);

-		label.setText(Messages.get().EventDetailsDialog_message);

-		gd = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);

-		label.setLayoutData(gd);

-		msgText = new Text(textContainer, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER);

-		msgText.setEditable(false);

-		gd = new GridData(GridData.FILL_BOTH | GridData.VERTICAL_ALIGN_BEGINNING | GridData.GRAB_VERTICAL);

-		gd.horizontalSpan = 2;

-		gd.grabExcessVerticalSpace = true;

-		msgText.setLayoutData(gd);

-	}

-

-	private void createStackSection(Composite parent) {

-		Composite container = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout(2, false);

-		layout.marginHeight = 0;

-		layout.marginWidth = 0;

-		container.setLayout(layout);

-		GridData gd = new GridData(GridData.FILL_BOTH);

-		gd.heightHint = 200;

-		container.setLayoutData(gd);

-

-		Label label = new Label(container, SWT.NONE);

-		label.setText(Messages.get().EventDetailsDialog_exception);

-		gd = new GridData();

-		gd.verticalAlignment = SWT.BOTTOM;

-		label.setLayoutData(gd);

-

-		stackTraceText = new Text(container, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);

-		gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);

-		gd.grabExcessHorizontalSpace = true;

-		gd.horizontalSpan = 2;

-		stackTraceText.setLayoutData(gd);

-		stackTraceText.setEditable(false);

-	}

-

-	private void createSessionSection(Composite parent) {

-		Composite container = new Composite(parent, SWT.NONE);

-		GridLayout layout = new GridLayout();

-		layout.marginHeight = 0;

-		layout.marginWidth = 0;

-		container.setLayout(layout);

-		GridData gd = new GridData(GridData.FILL_HORIZONTAL);

-		gd.heightHint = 100;

-		container.setLayoutData(gd);

-

-		Label label = new Label(container, SWT.NONE);

-		label.setText(Messages.get().EventDetailsDialog_session);

-		gd = new GridData(GridData.FILL_HORIZONTAL);

-		label.setLayoutData(gd);

-		sessionDataText = new Text(container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);

-		gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL);

-		gd.grabExcessHorizontalSpace = true;

-		sessionDataText.setLayoutData(gd);

-		sessionDataText.setEditable(false);

-	}

-

-	/**

-	 * Loads filters from preferences.

-	 * @return filters from preferences or empty array

-	 * 

-	 * @since 3.4

-	 */

-	private String[] getFilters() {

-

-		Boolean filterEnabled = memento.getBoolean(FILTER_ENABLED);

-

-		String filtersString = memento.getString(FILTER_LIST);

-

-		if ((filterEnabled == null) || (filterEnabled.booleanValue() == false) || filtersString == null) {

-			return new String[0];

-		}

-

-		StringTokenizer st = new StringTokenizer(filtersString, ";"); //$NON-NLS-1$

-		List filters = new ArrayList();

-		while (st.hasMoreElements()) {

-			String filter = st.nextToken();

-			filters.add(filter);

-		}

-

-		return (String[]) filters.toArray(new String[filters.size()]);

-	}

-

-	/**

-	 * Filters stack trace.

-	 * Every stack trace line is compared against all patterns.

-	 * If line contains any of pattern strings, it's excluded from output.

-	 * 

-	 * @returns filtered stack trace

-	 * @since 3.4

-	 */

-	private String filterStack(String stack) {

-		if (stackFilterPatterns.length == 0) {

-			return stack;

-		}

-

-		StringTokenizer st = new StringTokenizer(stack, "\n"); //$NON-NLS-1$

-		StringBuffer result = new StringBuffer();

-		while (st.hasMoreTokens()) {

-			String stackElement = st.nextToken();

-

-			boolean filtered = false;

-			int i = 0;

-			while ((!filtered) && (i < stackFilterPatterns.length)) {

-				filtered = stackElement.indexOf(stackFilterPatterns[i]) >= 0;

-				i++;

-			}

-

-			if (!filtered) {

-				result.append(stackElement).append("\n"); //$NON-NLS-1$

-			}

-		}

-

-		return result.toString();

-	}

-

-	//--------------- configuration handling --------------

-

-	/**

-	 * Stores the current state in the dialog settings.

-	 * @since 2.0

-	 */

-	private void storeSettings() {

-		writeConfiguration();

-	}

-

-	/**

-	 * Returns the dialog settings object used to share state

-	 * between several event detail dialogs.

-	 * 

-	 * @return the dialog settings to be used

-	 */

-	private IDialogSettings getDialogSettings() {

-		IDialogSettings settings = Activator.getDefault().getDialogSettings();

-		IDialogSettings dialogSettings = settings.getSection(getClass().getName());

-		if (dialogSettings == null)

-			dialogSettings = settings.addNewSection(getClass().getName());

-		return dialogSettings;

-	}

-

-	/**

-	 * Initializes itself from the dialog settings with the same state

-	 * as at the previous invocation.

-	 */

-	private void readConfiguration() {

-		IDialogSettings s = getDialogSettings();

-		try {

-			int x = s.getInt("x"); //$NON-NLS-1$

-			int y = s.getInt("y"); //$NON-NLS-1$

-			dialogLocation = new Point(x, y);

-

-			x = s.getInt("width"); //$NON-NLS-1$

-			y = s.getInt("height"); //$NON-NLS-1$

-			dialogSize = new Point(x, y);

-

-			sashWeights = new int[3];

-			sashWeights[0] = s.getInt("sashWidth1"); //$NON-NLS-1$

-			sashWeights[1] = s.getInt("sashWidth2"); //$NON-NLS-1$

-			sashWeights[2] = s.getInt("sashWidth3"); //$NON-NLS-1$

-		} catch (NumberFormatException e) {

-			dialogLocation = null;

-			dialogSize = null;

-			sashWeights = null;

-		}

-	}

-

-	private void writeConfiguration() {

-		IDialogSettings s = getDialogSettings();

-		Point location = getShell().getLocation();

-		s.put("x", location.x); //$NON-NLS-1$

-		s.put("y", location.y); //$NON-NLS-1$

-

-		Point size = getShell().getSize();

-		s.put("width", size.x); //$NON-NLS-1$

-		s.put("height", size.y); //$NON-NLS-1$

-

-		sashWeights = getSashForm().getWeights();

-		s.put("sashWidth1", sashWeights[0]); //$NON-NLS-1$

-		s.put("sashWidth2", sashWeights[1]); //$NON-NLS-1$

-		s.put("sashWidth3", sashWeights[2]); //$NON-NLS-1$

-	}

-

-	/**

-	 * Utility method to get all top level elements of the Log View

-	 * @return top level elements of the Log View

-	 */

-	private AbstractEntry[] getElements() {

-		return (AbstractEntry[]) ((ITreeContentProvider) provider.getContentProvider()).getElements(null);

-	}

-}

+/*******************************************************************************
+ * 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207466, 207344
+ *     Remy Chi Jian Suen <remy.suen@gmail.com> - bug 272985
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import com.ibm.icu.text.DateFormat;
+import java.io.*;
+import java.text.Collator;
+import java.util.*;
+import java.util.List;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.dialogs.*;
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.jface.viewers.*;
+import org.eclipse.jface.window.Window;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.accessibility.AccessibleAdapter;
+import org.eclipse.swt.accessibility.AccessibleEvent;
+import org.eclipse.swt.custom.SashForm;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.*;
+import org.eclipse.ui.*;
+
+
+/**
+ * Displays details about Log Entry. Event information is split in three sections: details, stack
+ * trace and session. Details contain event date, message and severity. Stack trace is displayed if
+ * an exception is bound to event. Stack trace entries can be filtered.
+ */
+public class EventDetailsDialog extends TrayDialog {
+
+  public static final String FILTER_ENABLED = "detailsStackFilterEnabled"; //$NON-NLS-1$
+  public static final String FILTER_LIST = "detailsStackFilterList"; //$NON-NLS-1$
+  private IMemento memento;
+  private AbstractEntry entry;
+  private AbstractEntry parentEntry; // parent of the entry
+  private AbstractEntry[] entryChildren; // children of the entry
+  private LogViewLabelProvider labelProvider;
+  private TreeViewer provider;
+  private static int COPY_ID = 22;
+  private int childIndex = 0;
+  private boolean isOpen;
+  private boolean isLastChild;
+  private boolean isAtEndOfLog;
+  private Label plugInIdLabel;
+  private Label severityImageLabel;
+  private Label severityLabel;
+  private Label dateLabel;
+  private Text msgText;
+  private Text stackTraceText;
+  private Text sessionDataText;
+// private Clipboard clipboard;
+  private Button copyButton;
+  private Button backButton;
+  private Button nextButton;
+  private SashForm sashForm;
+  // sorting
+  private Comparator comparator = null;
+  Collator collator;
+  // patterns for filtering stack traces
+  private String[] stackFilterPatterns = null;
+  // location configuration
+  private Point dialogLocation;
+  private Point dialogSize;
+  private int[] sashWeights;
+  private DateFormat dateFormat = DateFormat.getDateTimeInstance( DateFormat.SHORT,
+                                                                  DateFormat.SHORT );
+
+  /**
+   * @param parentShell shell in which dialog is displayed
+   * @param selection entry initially selected and to be displayed
+   * @param provider viewer
+   * @param comparator comparator used to order all entries
+   */
+  protected EventDetailsDialog( Shell parentShell,
+                                IAdaptable selection,
+                                ISelectionProvider provider,
+                                Comparator comparator,
+                                IMemento memento )
+  {
+    super( parentShell );
+    this.provider = ( TreeViewer )provider;
+    labelProvider = ( LogViewLabelProvider )this.provider.getLabelProvider();
+    labelProvider.connect( this );
+    this.entry = ( AbstractEntry )selection;
+    this.comparator = comparator;
+    this.memento = memento;
+    setShellStyle( SWT.MODELESS
+                   | SWT.MIN
+                   | SWT.MAX
+                   | SWT.RESIZE
+                   | SWT.CLOSE
+                   | SWT.BORDER
+                   | SWT.TITLE );
+// clipboard = new Clipboard( parentShell.getDisplay() );
+    initialize();
+    collator = Collator.getInstance();
+    readConfiguration();
+    isLastChild = false;
+    isAtEndOfLog = false;
+    stackFilterPatterns = getFilters();
+  }
+
+  /*
+   * @see org.eclipse.jface.window.Window#configureShell(Shell)
+   */
+  @Override
+  protected void configureShell( Shell newShell ) {
+    super.configureShell( newShell );
+    PlatformUI.getWorkbench().getHelpSystem().setHelp( newShell, IHelpContextIds.LOG_EVENTDETAILS );
+  }
+
+  private void initialize() {
+    parentEntry = ( AbstractEntry )entry.getParent( entry );
+    if( isChild( entry ) ) {
+      setEntryChildren( parentEntry );
+    } else {
+      setEntryChildren();
+    }
+    resetChildIndex();
+    isLastChild = false;
+    isAtEndOfLog = false;
+  }
+
+  private void resetChildIndex() {
+    if( entryChildren == null )
+      return;
+    LogEntry thisEntry = ( LogEntry )entry;
+    for( int i = 0; i < entryChildren.length; i++ ) {
+      if( entryChildren[ i ] instanceof LogEntry ) {
+        LogEntry logEntry = ( LogEntry )entryChildren[ i ];
+        if( logEntry == thisEntry ) {
+          childIndex = i;
+          return;
+        }
+      }
+    }
+    childIndex = 0;
+  }
+
+  private boolean isChild( AbstractEntry entry ) {
+    return entry.getParent( entry ) != null;
+  }
+
+  public boolean isOpen() {
+    return isOpen;
+  }
+
+  @Override
+  public int open() {
+    isOpen = true;
+    if( sashWeights == null ) {
+      int a, b, c;
+      int height = getSashForm().getClientArea().height;
+      if( height < 250 ) {
+        a = b = c = height / 3;
+      } else {
+        a = 100; // Details section needs about 100
+        c = 100; // Text area gets 100
+        b = height - a - c; // Stack trace should take up majority of room
+      }
+      sashWeights = new int[] {
+        a,
+        b,
+        c
+      };
+    }
+    getSashForm().setWeights( sashWeights );
+    return super.open();
+  }
+
+  @Override
+  public boolean close() {
+// if( clipboard != null ) {
+// clipboard.dispose();
+// clipboard = null;
+// }
+    storeSettings();
+    isOpen = false;
+    labelProvider.disconnect( this );
+    return super.close();
+  }
+
+  @Override
+  public void create() {
+    super.create();
+    // dialog location
+    if( dialogLocation != null )
+      getShell().setLocation( dialogLocation );
+    // dialog size
+    if( dialogSize != null )
+      getShell().setSize( dialogSize );
+    else
+      getShell().setSize( 500, 550 );
+    applyDialogFont( buttonBar );
+    getButton( IDialogConstants.OK_ID ).setFocus();
+  }
+
+  @Override
+  protected void buttonPressed( int buttonId ) {
+    if( IDialogConstants.OK_ID == buttonId )
+      okPressed();
+    else if( IDialogConstants.CANCEL_ID == buttonId )
+      cancelPressed();
+    else if( IDialogConstants.BACK_ID == buttonId )
+      backPressed();
+    else if( IDialogConstants.NEXT_ID == buttonId )
+      nextPressed();
+    else if( COPY_ID == buttonId )
+      copyPressed();
+  }
+
+  protected void backPressed() {
+    if( childIndex > 0 ) {
+      if( isLastChild && ( isChild( entry ) ) ) {
+        setEntryChildren( parentEntry );
+        isLastChild = false;
+      }
+      childIndex-- ;
+      entry = entryChildren[ childIndex ];
+    } else {
+      if( parentEntry instanceof LogEntry ) {
+        entry = parentEntry;
+        if( isChild( entry ) ) {
+          setEntryChildren( ( AbstractEntry )entry.getParent( entry ) );
+        } else {
+          setEntryChildren();
+        }
+        resetChildIndex();
+      }
+    }
+    setEntrySelectionInTable();
+  }
+
+  protected void nextPressed() {
+    if( childIndex < entryChildren.length - 1 ) {
+      childIndex++ ;
+      entry = entryChildren[ childIndex ];
+      isLastChild = childIndex == entryChildren.length - 1;
+    } else if( isChild( entry ) && isLastChild && !isAtEndOfLog ) {
+      findNextSelectedChild( entry );
+    } else { // at end of list but can branch into child elements - bug 58083
+      setEntryChildren( entry );
+      entry = entryChildren[ 0 ];
+      isAtEndOfLog = entryChildren.length == 0;
+      isLastChild = entryChildren.length == 0;
+    }
+    setEntrySelectionInTable();
+  }
+
+  protected void copyPressed() {
+    StringWriter writer = new StringWriter();
+    PrintWriter pwriter = new PrintWriter( writer );
+    entry.write( pwriter );
+    pwriter.flush();
+    String textVersion = writer.toString();
+    try {
+      pwriter.close();
+      writer.close();
+    } catch( IOException e ) { // do nothing
+    }
+    // set the clipboard contents
+// clipboard.setContents( new Object[] {
+// textVersion
+// }, new Transfer[] {
+// TextTransfer.getInstance()
+// } );
+  }
+
+  public void setComparator( Comparator comparator ) {
+    this.comparator = comparator;
+    updateProperties();
+  }
+
+  private void setComparator( byte sortType, final int sortOrder ) {
+    if( sortType == LogView.DATE ) {
+      comparator = new Comparator() {
+
+        @Override
+        public int compare( Object e1, Object e2 ) {
+          Date date1 = ( ( LogEntry )e1 ).getDate();
+          Date date2 = ( ( LogEntry )e2 ).getDate();
+          if( sortOrder == LogView.ASCENDING )
+            return date1.getTime() < date2.getTime()
+                                                     ? LogView.DESCENDING
+                                                     : LogView.ASCENDING;
+          return date1.getTime() > date2.getTime()
+                                                   ? LogView.DESCENDING
+                                                   : LogView.ASCENDING;
+        }
+      };
+    } else if( sortType == LogView.PLUGIN ) {
+      comparator = new Comparator() {
+
+        @Override
+        public int compare( Object e1, Object e2 ) {
+          LogEntry entry1 = ( LogEntry )e1;
+          LogEntry entry2 = ( LogEntry )e2;
+          return collator.compare( entry1.getPluginId(), entry2.getPluginId() ) * sortOrder;
+        }
+      };
+    } else {
+      comparator = new Comparator() {
+
+        @Override
+        public int compare( Object e1, Object e2 ) {
+          LogEntry entry1 = ( LogEntry )e1;
+          LogEntry entry2 = ( LogEntry )e2;
+          return collator.compare( entry1.getMessage(), entry2.getMessage() ) * sortOrder;
+        }
+      };
+    }
+  }
+
+  public void resetSelection( IAdaptable selectedEntry, byte sortType, int sortOrder ) {
+    setComparator( sortType, sortOrder );
+    resetSelection( selectedEntry );
+  }
+
+  public void resetSelection( IAdaptable selectedEntry ) {
+    if( entry.equals( selectedEntry ) ) {
+      updateProperties();
+      return;
+    }
+    if( selectedEntry instanceof AbstractEntry ) {
+      entry = ( AbstractEntry )selectedEntry;
+      initialize();
+      updateProperties();
+    }
+  }
+
+  public void resetButtons() {
+    backButton.setEnabled( false );
+    nextButton.setEnabled( false );
+  }
+
+  private void setEntrySelectionInTable() {
+    ISelection selection = new StructuredSelection( entry );
+    provider.setSelection( selection );
+  }
+
+  public void updateProperties() {
+    if( isChild( entry ) ) {
+      parentEntry = ( AbstractEntry )entry.getParent( entry );
+      setEntryChildren( parentEntry );
+      resetChildIndex();
+      if( childIndex == entryChildren.length - 1 )
+        isLastChild = true;
+    }
+    if( entry instanceof LogEntry ) {
+      LogEntry logEntry = ( LogEntry )entry;
+      String strDate = dateFormat.format( logEntry.getDate() );
+      dateLabel.setText( strDate );
+      plugInIdLabel.setText( logEntry.getPluginId() );
+      severityImageLabel.setImage( labelProvider.getColumnImage( entry, 0 ) );
+      severityLabel.setText( logEntry.getSeverityText() );
+      msgText.setText( logEntry.getMessage() != null
+                                                     ? logEntry.getMessage()
+                                                     : "" ); //$NON-NLS-1$
+      String stack = logEntry.getStack();
+      if( stack != null ) {
+        stack = filterStack( stack );
+        stackTraceText.setText( stack );
+      } else {
+        stackTraceText.setText( Messages.get().EventDetailsDialog_noStack );
+      }
+      if( logEntry.getSession() != null ) {
+        String session = logEntry.getSession().getSessionData();
+        if( session != null ) {
+          sessionDataText.setText( session );
+        }
+      }
+    } else {
+      dateLabel.setText( "" ); //$NON-NLS-1$
+      severityImageLabel.setImage( null );
+      severityLabel.setText( "" ); //$NON-NLS-1$
+      msgText.setText( "" ); //$NON-NLS-1$
+      stackTraceText.setText( "" ); //$NON-NLS-1$
+      sessionDataText.setText( "" ); //$NON-NLS-1$
+    }
+    updateButtons();
+  }
+
+  private void updateButtons() {
+    boolean isAtEnd = childIndex == entryChildren.length - 1;
+    if( isChild( entry ) ) {
+      boolean canGoToParent = ( entry.getParent( entry ) instanceof LogEntry );
+      backButton.setEnabled( ( childIndex > 0 ) || canGoToParent );
+      nextButton.setEnabled( nextChildExists( entry, parentEntry, entryChildren )
+                             || entry.hasChildren()
+                             || !isLastChild
+                             || !isAtEnd );
+    } else {
+      backButton.setEnabled( childIndex != 0 );
+      nextButton.setEnabled( !isAtEnd || entry.hasChildren() );
+    }
+  }
+
+  private void findNextSelectedChild( AbstractEntry originalEntry ) {
+    if( isChild( parentEntry ) ) {
+      // we're at the end of the child list; find next parent
+      // to select. If the parent is a child at the end of the child
+      // list, find its next parent entry to select, etc.
+      entry = parentEntry;
+      setEntryChildren( ( AbstractEntry )parentEntry.getParent( parentEntry ) );
+      parentEntry = ( AbstractEntry )parentEntry.getParent( parentEntry );
+      resetChildIndex();
+      isLastChild = childIndex == entryChildren.length - 1;
+      if( isLastChild ) {
+        findNextSelectedChild( originalEntry );
+      } else {
+        nextPressed();
+      }
+    } else if( parentEntry instanceof LogEntry ) {
+      entry = parentEntry;
+      setEntryChildren();
+      resetChildIndex();
+      isLastChild = childIndex == entryChildren.length - 1;
+      if( isLastChild ) {
+        if( isChild( entry ) ) {
+          findNextSelectedChild( originalEntry );
+        } else {
+          entry = originalEntry;
+          isAtEndOfLog = true;
+          nextPressed();
+        }
+      } else {
+        nextPressed();
+      }
+    } else {
+      entry = originalEntry;
+      isAtEndOfLog = true;
+      nextPressed();
+    }
+  }
+
+  private boolean nextChildExists( AbstractEntry originalEntry,
+                                   AbstractEntry originalParent,
+                                   AbstractEntry[] originalEntries )
+  {
+    if( isChild( parentEntry ) ) {
+      // we're at the end of the child list; find next parent
+      // to select. If the parent is a child at the end of the child
+      // list, find its next parent entry to select, etc.
+      entry = parentEntry;
+      parentEntry = ( AbstractEntry )entry.getParent( entry );
+      setEntryChildren( parentEntry );
+      resetChildIndex();
+      if( childIndex == entryChildren.length - 1 ) {
+        return nextChildExists( originalEntry, originalParent, originalEntries );
+      }
+      entry = originalEntry;
+      parentEntry = originalParent;
+      entryChildren = originalEntries;
+      resetChildIndex();
+      return true;
+    } else if( parentEntry instanceof LogEntry ) {
+      entry = parentEntry;
+      setEntryChildren();
+      childIndex = -1;
+      resetChildIndex();
+      if( ( childIndex != -1 ) && ( childIndex < entryChildren.length - 1 ) ) {
+        entry = originalEntry;
+        parentEntry = originalParent;
+        entryChildren = originalEntries;
+        resetChildIndex();
+        return true;
+      }
+    }
+    entry = originalEntry;
+    parentEntry = originalParent;
+    entryChildren = originalEntries;
+    resetChildIndex();
+    return false;
+  }
+
+  /**
+   * Sets entry children (Prev-Next navigable) to top-level elements
+   */
+  private void setEntryChildren() {
+    AbstractEntry[] children = getElements();
+    if( comparator != null )
+      Arrays.sort( children, comparator );
+    entryChildren = new AbstractEntry[ children.length ];
+    System.arraycopy( children, 0, entryChildren, 0, children.length );
+  }
+
+  /**
+   * Sets entry children (Prev-Next navigable) to children of given entry
+   */
+  private void setEntryChildren( AbstractEntry entry ) {
+    Object[] children = entry.getChildren( entry );
+    if( comparator != null )
+      Arrays.sort( children, comparator );
+    List result = new ArrayList();
+    for( int i = 0; i < children.length; i++ ) {
+      if( children[ i ] instanceof AbstractEntry ) {
+        result.add( children[ i ] );
+      }
+    }
+    entryChildren = ( AbstractEntry[] )result.toArray( new AbstractEntry[ result.size() ] );
+  }
+
+  public SashForm getSashForm() {
+    return sashForm;
+  }
+
+  @Override
+  protected Control createDialogArea( Composite parent ) {
+    Composite container = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.numColumns = 1;
+    container.setLayout( layout );
+    GridData gd = new GridData( GridData.FILL_BOTH );
+    container.setLayoutData( gd );
+    createSashForm( container );
+    createDetailsSection( getSashForm() );
+    createStackSection( getSashForm() );
+    createSessionSection( getSashForm() );
+    updateProperties();
+    Dialog.applyDialogFont( container );
+    return container;
+  }
+
+  private void createSashForm( Composite parent ) {
+    sashForm = new SashForm( parent, SWT.VERTICAL );
+    GridLayout layout = new GridLayout();
+    layout.marginHeight = layout.marginWidth = 0;
+    sashForm.setLayout( layout );
+    sashForm.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+    sashForm.setSashWidth( 10 );
+  }
+
+  private void createToolbarButtonBar( Composite parent ) {
+    Composite comp = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.marginWidth = layout.marginHeight = 0;
+    // layout.numColumns = 1;
+    comp.setLayout( layout );
+    comp.setLayoutData( new GridData( GridData.FILL_VERTICAL ) );
+    ( ( GridData )comp.getLayoutData() ).verticalAlignment = SWT.BOTTOM;
+    Composite container = new Composite( comp, SWT.NONE );
+    layout = new GridLayout();
+    layout.marginWidth = 0;
+    layout.marginHeight = 0;
+    container.setLayout( layout );
+    container.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+    backButton = createButton( container, IDialogConstants.BACK_ID, "", false ); //$NON-NLS-1$
+    GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+    backButton.setLayoutData( gd );
+    backButton.setToolTipText( Messages.get().EventDetailsDialog_previous );
+    backButton.setImage( SharedImages.getImage( SharedImages.DESC_PREV_EVENT ) );
+    backButton.getAccessible().addAccessibleListener( new AccessibleAdapter() {
+
+      @Override
+      public void getName( AccessibleEvent e ) {
+        e.result = Messages.get().EventDetailsDialog_previous;
+      }
+    } );
+    copyButton = createButton( container, COPY_ID, "", false ); //$NON-NLS-1$
+    gd = new GridData();
+    copyButton.setLayoutData( gd );
+    copyButton.setImage( PlatformUI.getWorkbench()
+      .getSharedImages()
+      .getImage( ISharedImages.IMG_TOOL_COPY ) );
+    copyButton.setToolTipText( Messages.get().EventDetailsDialog_copy );
+    copyButton.getAccessible().addAccessibleListener( new AccessibleAdapter() {
+
+      @Override
+      public void getName( AccessibleEvent e ) {
+        e.result = Messages.get().EventDetailsDialog_copy;
+      }
+    } );
+    nextButton = createButton( container, IDialogConstants.NEXT_ID, "", false ); //$NON-NLS-1$
+    gd = new GridData();
+    nextButton.setLayoutData( gd );
+    nextButton.setToolTipText( Messages.get().EventDetailsDialog_next );
+    nextButton.setImage( SharedImages.getImage( SharedImages.DESC_NEXT_EVENT ) );
+    nextButton.getAccessible().addAccessibleListener( new AccessibleAdapter() {
+
+      @Override
+      public void getName( AccessibleEvent e ) {
+        e.result = Messages.get().EventDetailsDialog_next;
+      }
+    } );
+    Button button = new Button( container, SWT.NONE );
+    button.setToolTipText( Messages.get().EventDetailsDialog_ShowFilterDialog );
+    button.setImage( SharedImages.getImage( SharedImages.DESC_FILTER ) );
+    gd = new GridData();
+    gd.horizontalAlignment = SWT.RIGHT;
+    button.setLayoutData( gd );
+    button.addSelectionListener( new SelectionAdapter() {
+
+      @Override
+      public void widgetSelected( SelectionEvent e ) {
+        FilterDialog dialog = new FilterDialog( getShell(), memento );
+        dialog.create();
+        dialog.getShell().setText( Messages.get().EventDetailsDialog_FilterDialog );
+        if( dialog.open() == Window.OK )
+          // update filters and currently displayed stack trace
+          stackFilterPatterns = getFilters();
+        updateProperties();
+      }
+    } );
+    button.getAccessible().addAccessibleListener( new AccessibleAdapter() {
+
+      @Override
+      public void getName( AccessibleEvent e ) {
+        e.result = Messages.get().EventDetailsDialog_FilterDialog;
+      }
+    } );
+    // set numColumns at the end, after all createButton() calls, which change this value
+    layout.numColumns = 2;
+  }
+
+  @Override
+  protected void createButtonsForButtonBar( Composite parent ) {
+    // create OK button only by default
+    createButton( parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true );
+  }
+
+  private void createDetailsSection( Composite parent ) {
+    Composite container = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.marginWidth = layout.marginHeight = 0;
+    layout.numColumns = 2;
+    container.setLayout( layout );
+    GridData data = new GridData( GridData.FILL_HORIZONTAL );
+    data.heightHint = 200;
+    container.setLayoutData( data );
+    createTextSection( container );
+    createToolbarButtonBar( container );
+  }
+
+  private void createTextSection( Composite parent ) {
+    Composite textContainer = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.numColumns = 3;
+    layout.marginHeight = layout.marginWidth = 0;
+    textContainer.setLayout( layout );
+    textContainer.setLayoutData( new GridData( GridData.FILL_BOTH ) );
+    Label label = new Label( textContainer, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_plugIn );
+    plugInIdLabel = new Label( textContainer, SWT.NONE );
+    GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+    gd.horizontalSpan = 2;
+    plugInIdLabel.setLayoutData( gd );
+    label = new Label( textContainer, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_severity );
+    severityImageLabel = new Label( textContainer, SWT.NONE );
+    severityLabel = new Label( textContainer, SWT.NONE );
+    gd = new GridData( GridData.FILL_HORIZONTAL );
+    severityLabel.setLayoutData( gd );
+    label = new Label( textContainer, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_date );
+    dateLabel = new Label( textContainer, SWT.NONE );
+    gd = new GridData( GridData.FILL_HORIZONTAL );
+    gd.horizontalSpan = 2;
+    dateLabel.setLayoutData( gd );
+    label = new Label( textContainer, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_message );
+    gd = new GridData( GridData.VERTICAL_ALIGN_BEGINNING );
+    label.setLayoutData( gd );
+    msgText = new Text( textContainer, SWT.MULTI | SWT.V_SCROLL | SWT.WRAP | SWT.BORDER );
+    msgText.setEditable( false );
+    gd = new GridData( GridData.FILL_BOTH
+                       | GridData.VERTICAL_ALIGN_BEGINNING
+                       | GridData.GRAB_VERTICAL );
+    gd.horizontalSpan = 2;
+    gd.grabExcessVerticalSpace = true;
+    msgText.setLayoutData( gd );
+  }
+
+  private void createStackSection( Composite parent ) {
+    Composite container = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout( 2, false );
+    layout.marginHeight = 0;
+    layout.marginWidth = 0;
+    container.setLayout( layout );
+    GridData gd = new GridData( GridData.FILL_BOTH );
+    gd.heightHint = 200;
+    container.setLayoutData( gd );
+    Label label = new Label( container, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_exception );
+    gd = new GridData();
+    gd.verticalAlignment = SWT.BOTTOM;
+    label.setLayoutData( gd );
+    stackTraceText = new Text( container, SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER );
+    gd = new GridData( GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL );
+    gd.grabExcessHorizontalSpace = true;
+    gd.horizontalSpan = 2;
+    stackTraceText.setLayoutData( gd );
+    stackTraceText.setEditable( false );
+  }
+
+  private void createSessionSection( Composite parent ) {
+    Composite container = new Composite( parent, SWT.NONE );
+    GridLayout layout = new GridLayout();
+    layout.marginHeight = 0;
+    layout.marginWidth = 0;
+    container.setLayout( layout );
+    GridData gd = new GridData( GridData.FILL_HORIZONTAL );
+    gd.heightHint = 100;
+    container.setLayoutData( gd );
+    Label label = new Label( container, SWT.NONE );
+    label.setText( Messages.get().EventDetailsDialog_session );
+    gd = new GridData( GridData.FILL_HORIZONTAL );
+    label.setLayoutData( gd );
+    sessionDataText = new Text( container, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
+    gd = new GridData( GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL );
+    gd.grabExcessHorizontalSpace = true;
+    sessionDataText.setLayoutData( gd );
+    sessionDataText.setEditable( false );
+  }
+
+  /**
+   * Loads filters from preferences.
+   * 
+   * @return filters from preferences or empty array
+   * @since 3.4
+   */
+  private String[] getFilters() {
+    Boolean filterEnabled = memento.getBoolean( FILTER_ENABLED );
+    String filtersString = memento.getString( FILTER_LIST );
+    if( ( filterEnabled == null )
+        || ( filterEnabled.booleanValue() == false )
+        || filtersString == null )
+    {
+      return new String[ 0 ];
+    }
+    StringTokenizer st = new StringTokenizer( filtersString, ";" ); //$NON-NLS-1$
+    List filters = new ArrayList();
+    while( st.hasMoreElements() ) {
+      String filter = st.nextToken();
+      filters.add( filter );
+    }
+    return ( String[] )filters.toArray( new String[ filters.size() ] );
+  }
+
+  /**
+   * Filters stack trace. Every stack trace line is compared against all patterns. If line contains
+   * any of pattern strings, it's excluded from output.
+   *
+   * @returns filtered stack trace
+   * @since 3.4
+   */
+  private String filterStack( String stack ) {
+    if( stackFilterPatterns.length == 0 ) {
+      return stack;
+    }
+    StringTokenizer st = new StringTokenizer( stack, "\n" ); //$NON-NLS-1$
+    StringBuffer result = new StringBuffer();
+    while( st.hasMoreTokens() ) {
+      String stackElement = st.nextToken();
+      boolean filtered = false;
+      int i = 0;
+      while( ( !filtered ) && ( i < stackFilterPatterns.length ) ) {
+        filtered = stackElement.indexOf( stackFilterPatterns[ i ] ) >= 0;
+        i++ ;
+      }
+      if( !filtered ) {
+        result.append( stackElement ).append( "\n" ); //$NON-NLS-1$
+      }
+    }
+    return result.toString();
+  }
+
+  // --------------- configuration handling --------------
+  /**
+   * Stores the current state in the dialog settings.
+   * 
+   * @since 2.0
+   */
+  private void storeSettings() {
+    writeConfiguration();
+  }
+
+  /**
+   * Returns the dialog settings object used to share state between several event detail dialogs.
+   *
+   * @return the dialog settings to be used
+   */
+  private IDialogSettings getDialogSettings() {
+    IDialogSettings settings = Activator.getDefault().getDialogSettings();
+    IDialogSettings dialogSettings = settings.getSection( getClass().getName() );
+    if( dialogSettings == null )
+      dialogSettings = settings.addNewSection( getClass().getName() );
+    return dialogSettings;
+  }
+
+  /**
+   * Initializes itself from the dialog settings with the same state as at the previous invocation.
+   */
+  private void readConfiguration() {
+    IDialogSettings s = getDialogSettings();
+    try {
+      int x = s.getInt( "x" ); //$NON-NLS-1$
+      int y = s.getInt( "y" ); //$NON-NLS-1$
+      dialogLocation = new Point( x, y );
+      x = s.getInt( "width" ); //$NON-NLS-1$
+      y = s.getInt( "height" ); //$NON-NLS-1$
+      dialogSize = new Point( x, y );
+      sashWeights = new int[ 3 ];
+      sashWeights[ 0 ] = s.getInt( "sashWidth1" ); //$NON-NLS-1$
+      sashWeights[ 1 ] = s.getInt( "sashWidth2" ); //$NON-NLS-1$
+      sashWeights[ 2 ] = s.getInt( "sashWidth3" ); //$NON-NLS-1$
+    } catch( NumberFormatException e ) {
+      dialogLocation = null;
+      dialogSize = null;
+      sashWeights = null;
+    }
+  }
+
+  private void writeConfiguration() {
+    IDialogSettings s = getDialogSettings();
+    Point location = getShell().getLocation();
+    s.put( "x", location.x ); //$NON-NLS-1$
+    s.put( "y", location.y ); //$NON-NLS-1$
+    Point size = getShell().getSize();
+    s.put( "width", size.x ); //$NON-NLS-1$
+    s.put( "height", size.y ); //$NON-NLS-1$
+    sashWeights = getSashForm().getWeights();
+    s.put( "sashWidth1", sashWeights[ 0 ] ); //$NON-NLS-1$
+    s.put( "sashWidth2", sashWeights[ 1 ] ); //$NON-NLS-1$
+    s.put( "sashWidth3", sashWeights[ 2 ] ); //$NON-NLS-1$
+  }
+
+  /**
+   * Utility method to get all top level elements of the Log View
+   * 
+   * @return top level elements of the Log View
+   */
+  private AbstractEntry[] getElements() {
+    return ( AbstractEntry[] )( ( ITreeContentProvider )provider.getContentProvider() )
+      .getElements( null );
+  }
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialogAction.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialogAction.java
index 17b7b0f..aa5a826 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialogAction.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/EventDetailsDialogAction.java
@@ -1,100 +1,102 @@
-/*******************************************************************************

- * Copyright (c) 2000, 2011 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.util.Comparator;

-import org.eclipse.core.runtime.Assert;

-import org.eclipse.core.runtime.IAdaptable;

-import org.eclipse.jface.viewers.ISelectionProvider;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.ui.IMemento;

-import org.eclipse.ui.actions.SelectionProviderAction;

-

-/**

- * Opens EventDetailsDialog

- */

-public class EventDetailsDialogAction extends SelectionProviderAction {

-

-	/**

-	 * The control that the dialog should appear on top of.

-	 */

-	private Control control;

-	private ISelectionProvider provider;

-	private EventDetailsDialog propertyDialog;

-	private Comparator comparator;

-	private IMemento memento;

-

-	/**

-	 * Creates a new action for opening a property dialog

-	 * on the elements from the given selection provider

-	 * @param control - the control that the details dialog should show up on

-	 * @param provider - the selection provider whose elements

-	 * @param memento - memento with EventDetails dialog options

-	 * the property dialog will describe

-	 */

-	public EventDetailsDialogAction(Control control, ISelectionProvider provider, IMemento memento) {

-		super(provider, Messages.get().EventDetailsDialog_title);

-		Assert.isNotNull(control);

-		this.control = control;

-		this.provider = provider;

-		this.memento = memento;

-		// setToolTipText

-		//WorkbenchHelp.setHelp

-	}

-

-	public boolean resetSelection(byte sortType, int sortOrder) {

-		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();

-		if (element == null)

-			return false;

-		if (propertyDialog != null && propertyDialog.isOpen()) {

-			propertyDialog.resetSelection(element, sortType, sortOrder);

-			return true;

-		}

-		return false;

-	}

-

-	public void resetSelection() {

-		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();

-		if ((element == null) || (!(element instanceof LogEntry)))

-			return;

-		if (propertyDialog != null && propertyDialog.isOpen())

-			propertyDialog.resetSelection(element);

-	}

-

-	public void resetDialogButtons() {

-		if (propertyDialog != null && propertyDialog.isOpen())

-			propertyDialog.resetButtons();

-	}

-

-	public void setComparator(Comparator comparator) {

-		this.comparator = comparator;

-		if (propertyDialog != null && propertyDialog.isOpen())

-			propertyDialog.setComparator(comparator);

-	}

-

-	public void run() {

-		if (propertyDialog != null && propertyDialog.isOpen()) {

-			resetSelection();

-			return;

-		}

-

-		//get initial selection

-		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();

-		if ((element == null) || (!(element instanceof LogEntry)))

-			return;

-

-		propertyDialog = new EventDetailsDialog(control.getShell(), element, provider, comparator, memento);

-		propertyDialog.create();

-		propertyDialog.getShell().setText(Messages.get().EventDetailsDialog_title);

-		propertyDialog.open();

-	}

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2011 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.util.Comparator;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.actions.SelectionProviderAction;
+
+/**
+ * Opens EventDetailsDialog
+ */
+public class EventDetailsDialogAction extends SelectionProviderAction {
+
+	/**
+	 * The control that the dialog should appear on top of.
+	 */
+	private Control control;
+	private ISelectionProvider provider;
+	private EventDetailsDialog propertyDialog;
+	private Comparator comparator;
+	private IMemento memento;
+
+	/**
+	 * Creates a new action for opening a property dialog
+	 * on the elements from the given selection provider
+	 * @param control - the control that the details dialog should show up on
+	 * @param provider - the selection provider whose elements
+	 * @param memento - memento with EventDetails dialog options
+	 * the property dialog will describe
+	 */
+	public EventDetailsDialogAction(Control control, ISelectionProvider provider, IMemento memento) {
+		super(provider, Messages.get().EventDetailsDialog_title);
+		Assert.isNotNull(control);
+		this.control = control;
+		this.provider = provider;
+		this.memento = memento;
+		// setToolTipText
+		//WorkbenchHelp.setHelp
+	}
+
+	public boolean resetSelection(byte sortType, int sortOrder) {
+		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();
+		if (element == null)
+			return false;
+		if (propertyDialog != null && propertyDialog.isOpen()) {
+			propertyDialog.resetSelection(element, sortType, sortOrder);
+			return true;
+		}
+		return false;
+	}
+
+	public void resetSelection() {
+		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();
+		if ((element == null) || (!(element instanceof LogEntry)))
+			return;
+		if (propertyDialog != null && propertyDialog.isOpen())
+			propertyDialog.resetSelection(element);
+	}
+
+	public void resetDialogButtons() {
+		if (propertyDialog != null && propertyDialog.isOpen())
+			propertyDialog.resetButtons();
+	}
+
+	public void setComparator(Comparator comparator) {
+		this.comparator = comparator;
+		if (propertyDialog != null && propertyDialog.isOpen())
+			propertyDialog.setComparator(comparator);
+	}
+
+	@Override
+	public void run() {
+		if (propertyDialog != null && propertyDialog.isOpen()) {
+			resetSelection();
+			return;
+		}
+
+		//get initial selection
+		IAdaptable element = (IAdaptable) getStructuredSelection().getFirstElement();
+		if ((element == null) || (!(element instanceof LogEntry)))
+			return;
+
+		propertyDialog = new EventDetailsDialog(control.getShell(), element, provider, comparator, memento);
+		propertyDialog.create();
+		propertyDialog.getShell().setText(Messages.get().EventDetailsDialog_title);
+		propertyDialog.open();
+	}
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
index 3addaea..00938cb 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/FilterDialog.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2003, 2014 IBM Corporation and others.
+ * Copyright (c) 2003, 2015 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
@@ -7,6 +7,7 @@
  *
  * Contributors:
  *     IBM Corporation - initial API and implementation
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
  *******************************************************************************/
 package org.eclipse.ui.internal.views.log;
 
@@ -30,7 +31,7 @@
 	// entries count limit
 	private Button limit;
 	Text limitText;
-	Spinner maxLogTailSizeSpinner;
+	Text maxLogTailSizeText;
 
 	// entry types filter
 	private Button errorCheckbox;
@@ -62,6 +63,7 @@
 		PlatformUI.getWorkbench().getHelpSystem().setHelp(newShell, IHelpContextIds.LOG_FILTER);
 	}
 
+	@Override
 	protected Control createDialogArea(Composite parent) {
 		Composite container = (Composite) super.createDialogArea(parent);
 		createEventTypesGroup(container);
@@ -109,6 +111,7 @@
 		limit.setText(Messages.get().LogView_FilterDialog_limitTo);
 		limit.setSelection(memento.getString(LogView.P_USE_LIMIT).equals("true")); //$NON-NLS-1$
 		limit.addSelectionListener(new SelectionAdapter() {
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				limitText.setEnabled(((Button) e.getSource()).getSelection());
 			}
@@ -116,6 +119,7 @@
 
 		limitText = new Text(comp, SWT.BORDER);
 		limitText.addVerifyListener(new VerifyListener() {
+			@Override
 			public void verifyText(VerifyEvent e) {
 				if (Character.isLetter(e.character)) {
 					e.doit = false;
@@ -123,12 +127,13 @@
 			}
 		});
 		limitText.addModifyListener(new ModifyListener() {
+			@Override
 			public void modifyText(ModifyEvent e) {
 				try {
 					if (okButton == null)
 						return;
-					Integer.parseInt(limitText.getText());
-					okButton.setEnabled(true);
+					int value = Integer.parseInt(limitText.getText());
+					okButton.setEnabled(value > 0);
 				} catch (NumberFormatException e1) {
 					okButton.setEnabled(false);
 				}
@@ -140,26 +145,33 @@
 
 		Label maxLogTailSizeLabel = new Label(comp, SWT.NONE);
 		maxLogTailSizeLabel.setText(Messages.get().LogView_FilterDialog_maxLogTailSize);
-		maxLogTailSizeSpinner = new Spinner(comp, SWT.BORDER);
-		maxLogTailSizeSpinner.addModifyListener(new ModifyListener() {
+
+		maxLogTailSizeText = new Text(comp, SWT.BORDER);
+		maxLogTailSizeText.addVerifyListener(new VerifyListener() {
+			@Override
+			public void verifyText(VerifyEvent e) {
+				if (Character.isLetter(e.character)) {
+					e.doit = false;
+				}
+			}
+		});
+
+		maxLogTailSizeText.addModifyListener(new ModifyListener() {
+			@Override
 			public void modifyText(ModifyEvent e) {
 				try {
 					if (okButton == null)
 						return;
-					Integer.parseInt(maxLogTailSizeSpinner.getText());
-					okButton.setEnabled(true);
+					int value = Integer.parseInt(maxLogTailSizeText.getText());
+					okButton.setEnabled(value > 0);
 				} catch (NumberFormatException e1) {
 					okButton.setEnabled(false);
 				}
 			}
 		});
-		maxLogTailSizeSpinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-		maxLogTailSizeSpinner.setValues(memento.getInteger(LogView.P_LOG_MAX_TAIL_SIZE).intValue(), 1, Integer.MAX_VALUE, 0, 1, 1);
-		maxLogTailSizeSpinner.setMinimum(1);
-		maxLogTailSizeSpinner.setIncrement(1);
-		maxLogTailSizeSpinner.setMaximum(Integer.MAX_VALUE);
-
-		maxLogTailSizeSpinner.setEnabled(limit.getSelection());
+		maxLogTailSizeText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+		maxLogTailSizeText.setText(memento.getString(LogView.P_LOG_MAX_TAIL_SIZE));
+		maxLogTailSizeText.setEnabled(limit.getSelection());
 	}
 
 	private void createSessionSection(Composite parent) {
@@ -201,6 +213,7 @@
 		gd.horizontalSpan = 2;
 		filterEnabled.setLayoutData(gd);
 		filterEnabled.addSelectionListener(new SelectionAdapter() {
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				setStackTraceFilterEnabled(filterEnabled.getSelection());
 			}
@@ -214,6 +227,7 @@
 		gd.horizontalIndent = 20;
 		filterList.setLayoutData(gd);
 		filterList.addSelectionListener(new SelectionAdapter() {
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				removeFilter.setEnabled(true);
 			}
@@ -224,6 +238,7 @@
 		addFilter.setLayoutData(gd);
 		addFilter.setText(Messages.get().FilterDialog_Add);
 		addFilter.addSelectionListener(new SelectionAdapter() {
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				addFilter();
 			}
@@ -235,6 +250,7 @@
 		removeFilter.setText(Messages.get().FilterDialog_Remove);
 		removeFilter.setEnabled(false);
 		removeFilter.addSelectionListener(new SelectionAdapter() {
+			@Override
 			public void widgetSelected(SelectionEvent e) {
 				removeFilter();
 			}
@@ -259,6 +275,7 @@
 	private void addFilter() {
 		IInputValidator validator = new IInputValidator() {
 
+			@Override
 			public String isValid(String newText) {
 				return newText.indexOf(';') >= 0 ? Messages.get().FilterDialog_FilterShouldntContainSemicolon : null;
 			}
@@ -288,11 +305,13 @@
 		removeFilter.setEnabled(enabled && filterList.getSelectionIndex() != -1);
 	}
 
+	@Override
 	protected void createButtonsForButtonBar(Composite parent) {
 		okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.get().OK_LABEL, true);
 		createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.get().CANCEL_LABEL, false);
 	}
 
+	@Override
 	protected void okPressed() {
 		memento.putString(LogView.P_LOG_OK, okCheckbox.getSelection() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
 		memento.putString(LogView.P_LOG_INFO, infoCheckbox.getSelection() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -300,7 +319,7 @@
 		memento.putString(LogView.P_LOG_ERROR, errorCheckbox.getSelection() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
 		memento.putString(LogView.P_LOG_LIMIT, limitText.getText());
 		memento.putString(LogView.P_USE_LIMIT, limit.getSelection() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
-		memento.putString(LogView.P_LOG_MAX_TAIL_SIZE, maxLogTailSizeSpinner.getText());
+		memento.putString(LogView.P_LOG_MAX_TAIL_SIZE, maxLogTailSizeText.getText());
 		memento.putString(LogView.P_SHOW_ALL_SESSIONS, showAllButton.getSelection() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
 
 		// store Event Dialog stack trace filter preferences
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Group.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Group.java
index 508075d..932a37a 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Group.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/Group.java
@@ -1,41 +1,43 @@
-/*******************************************************************************

- *  Copyright (c) 2007, 2008 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

- *  http://www.eclipse.org/legal/epl-v10.html

- * 

- *  Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344

- *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648 

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.io.PrintWriter;

-

-/**

- * Groups other Abstract Entries under given name.

- */

-public class Group extends AbstractEntry {

-

-	private String name;

-

-	public Group(String name) {

-		this.name = name;

-	}

-

-	public void write(PrintWriter writer) {

-		Object[] children = getChildren(null);

-		for (int i = 0; i < children.length; i++) {

-			AbstractEntry entry = (AbstractEntry) children[i];

-			entry.write(writer);

-			writer.println();

-		}

-	}

-

-	public String toString() {

-		return name;

-	}

-

+/*******************************************************************************
+ *  Copyright (c) 2007, 2008 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
+ *  http://www.eclipse.org/legal/epl-v10.html
+ *
+ *  Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344
+ *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.io.PrintWriter;
+
+/**
+ * Groups other Abstract Entries under given name.
+ */
+public class Group extends AbstractEntry {
+
+	private String name;
+
+	public Group(String name) {
+		this.name = name;
+	}
+
+	@Override
+	public void write(PrintWriter writer) {
+		Object[] children = getChildren(null);
+		for (int i = 0; i < children.length; i++) {
+			AbstractEntry entry = (AbstractEntry) children[i];
+			entry.write(writer);
+			writer.println();
+		}
+	}
+
+	@Override
+	public String toString() {
+		return name;
+	}
+
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
index 4964207..6035aae 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/IHelpContextIds.java
@@ -1,10 +1,10 @@
 /*******************************************************************************
- *  Copyright (c) 2007, 2012 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
  *  http://www.eclipse.org/legal/epl-v10.html
- * 
+ *
  *  Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ILogFileProvider.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ILogFileProvider.java
index 1340cd1..dcc76a1 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ILogFileProvider.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ILogFileProvider.java
@@ -1,27 +1,27 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.util.Map;

-

-/**

- * Provides log files.

- */

-public interface ILogFileProvider {

-

-	/**

-	 * Returns a Map of java.io.File log files indexed by String names.

-	 * 

-	 * @return Map of java.io.File log files index by String names.

-	 * @since 3.4

-	 */

-	Map getLogSources();

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.util.Map;
+
+/**
+ * Provides log files.
+ */
+public interface ILogFileProvider {
+
+	/**
+	 * Returns a Map of java.io.File log files indexed by String names.
+	 *
+	 * @return Map of java.io.File log files index by String names.
+	 * @since 3.4
+	 */
+	Map getLogSources();
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ImportLogAction.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ImportLogAction.java
index 692826e..0705f3c 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ImportLogAction.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/ImportLogAction.java
@@ -1,228 +1,212 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218293

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.util.*;

-import org.eclipse.core.runtime.Platform;

-import org.eclipse.jface.action.*;

-import org.eclipse.swt.widgets.Control;

-import org.eclipse.swt.widgets.Menu;

-import org.eclipse.ui.IMemento;

-

-/**

- * Imports log to Log View from such sources as file in local file system, file in workspace,

- * files from log files manager.

- */

-public class ImportLogAction extends Action implements IMenuCreator {

-

-	private Menu toolbarMenu = null;

-	private Menu popupMenu = null;

-

-	/**

-	 * View to import logs to.

-	 */

-	private final LogView logView;

-	private ImportConfigurationLogAction[] actions;

-	private IMemento fMemento;

-

-	/**

-	 * Action imports log file from given location to Log View.

-	 */

-	private class ImportConfigurationLogAction extends Action {

-		private String name;

-		private String location;

-

-		public ImportConfigurationLogAction(String name, String location) {

-			super(name, AS_RADIO_BUTTON);

-			this.name = name;

-			this.location = location;

-			setId(name + "#" + location); //$NON-NLS-1$

-		}

-

-		protected void doRun() {

-			logView.handleImportPath(location);

-		}

-

-		/*

-		 * (non-Javadoc)

-		 * @see org.eclipse.jface.action.Action#run()

-		 */

-		public void run() {

-			doRun();

-

-			// remember we clicked on that item

-			if (isChecked()) {

-				fMemento.putString(LogView.P_IMPORT_LOG, getId());

-			}

-		}

-

-		/*

-		 * (non-Javadoc)

-		 * @see java.lang.Object#equals(java.lang.Object)

-		 */

-		public boolean equals(Object o) {

-			if (o instanceof ImportConfigurationLogAction) {

-				ImportConfigurationLogAction action = (ImportConfigurationLogAction) o;

-				return name.equals(action.name) && location.equals(action.name);

-			}

-

-			return false;

-		}

-	}

-

-	public ImportLogAction(LogView logView, String text, IMemento memento) {

-		super(text);

-		this.logView = logView;

-		this.fMemento = memento;

-		setMenuCreator(this);

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.jface.action.Action#run()

-	 */

-	public void run() {

-		// by default import file selected by user

-		logView.handleImport();

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Control)

-	 */

-	public Menu getMenu(Control parent) {

-		if (menuUpdateNeeded(toolbarMenu)) {

-			toolbarMenu = new Menu(parent);

-			createMenuItems(toolbarMenu);

-		}

-		return toolbarMenu;

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.jface.action.IMenuCreator#getMenu(org.eclipse.swt.widgets.Menu)

-	 */

-	public Menu getMenu(Menu parent) {

-		if (menuUpdateNeeded(popupMenu)) {

-			popupMenu = new Menu(parent);

-			createMenuItems(popupMenu);

-		}

-		return popupMenu;

-	}

-

-	/**

-	 * Returns whether menu should be updated or not. Menu should be updated

-	 * if either number of actions or any of actions has been changed. 

-	 * @return true if menu should be updated, false otherwise

-	 */

-	private boolean menuUpdateNeeded(Menu menu) {

-		boolean result = false;

-

-		ImportConfigurationLogAction[] currActions = getLogActions();

-

-		if (menu == null) {

-			result = true;

-		} else if (actions == null) {

-			result = true;

-		} else if (currActions.length != actions.length) {

-			result = true;

-		} else {

-			for (int i = 0; i < currActions.length; i++) {

-				if (!currActions[i].equals(actions[i])) {

-					result = true;

-				}

-			}

-		}

-

-		if (result == true) {

-			actions = currActions;

-

-			if (toolbarMenu != null) {

-				toolbarMenu.dispose();

-				toolbarMenu = null;

-			}

-			if (popupMenu != null) {

-				popupMenu.dispose();

-				popupMenu = null;

-			}

-		}

-

-		return result;

-	}

-

-	/**

-	 * Returns list of all actions from LogFilesManager.

-	 * @return list of all actions from LogFilesManager

-	 */

-	private ImportConfigurationLogAction[] getLogActions() {

-		List result = new ArrayList();

-		Map sources = LogFilesManager.getLogSources();

-

-		for (Iterator j = sources.keySet().iterator(); j.hasNext();) {

-			String name = (String) j.next();

-			String location = (String) sources.get(name);

-			result.add(new ImportConfigurationLogAction(name, location));

-		}

-

-		return (ImportConfigurationLogAction[]) result.toArray(new ImportConfigurationLogAction[result.size()]);

-	}

-

-	/**

-	 * Builds menu of ImportLogAction actions from log files provided by LogFilesManager.

-	 * 

-	 * @see IMenuCreator#getMenu(Control)

-	 */

-	private void createMenuItems(Menu menu) {

-		String previouslyCheckedActionId = fMemento.getString(LogView.P_IMPORT_LOG);

-		if (actions.length == 0) {

-			Action action = new Action(Messages.get().ImportLogAction_noLaunchHistory) {

-				// dummy action

-			};

-			action.setEnabled(false);

-			ActionContributionItem actionItem = new ActionContributionItem(action);

-			actionItem.fill(menu, -1);

-		} else {

-			for (int i = 0; i < actions.length; i++) {

-				actions[i].setChecked(actions[i].getId().equals(previouslyCheckedActionId) && !logView.isPlatformLogOpen());

-				ActionContributionItem item = new ActionContributionItem(actions[i]);

-				item.fill(menu, -1);

-			}

-		}

-

-		(new Separator()).fill(menu, -1);

-		ImportConfigurationLogAction importWorkspaceLogAction = new ImportConfigurationLogAction(Messages.get().ImportLogAction_reloadWorkspaceLog, Platform.getLogFileLocation().toFile().getAbsolutePath()) {

-

-			public void doRun() {

-				logView.setPlatformLog();

-			}

-

-		};

-		importWorkspaceLogAction.setChecked(logView.isPlatformLogOpen());

-		ActionContributionItem item = new ActionContributionItem(importWorkspaceLogAction);

-		item.fill(menu, -1);

-	}

-

-	/*

-	 * (non-Javadoc)

-	 * @see org.eclipse.jface.action.IMenuCreator#dispose()

-	 */

-	public void dispose() {

-		if (toolbarMenu != null) {

-			toolbarMenu.dispose();

-			toolbarMenu = null;

-		}

-		if (popupMenu != null) {

-			popupMenu.dispose();

-			popupMenu = null;

-		}

-	}

-}

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218293
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.util.*;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.*;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.IMemento;
+
+/**
+ * Imports log to Log View from such sources as file in local file system, file in workspace,
+ * files from log files manager.
+ */
+public class ImportLogAction extends Action implements IMenuCreator {
+
+	private Menu toolbarMenu = null;
+	private Menu popupMenu = null;
+
+	/**
+	 * View to import logs to.
+	 */
+	private final LogView logView;
+	private ImportConfigurationLogAction[] actions;
+	private IMemento fMemento;
+
+	/**
+	 * Action imports log file from given location to Log View.
+	 */
+	private class ImportConfigurationLogAction extends Action {
+		private String name;
+		private String location;
+
+		public ImportConfigurationLogAction(String name, String location) {
+			super(name, AS_RADIO_BUTTON);
+			this.name = name;
+			this.location = location;
+			setId(name + "#" + location); //$NON-NLS-1$
+		}
+
+		protected void doRun() {
+			logView.handleImportPath(location);
+		}
+
+		@Override
+		public void run() {
+			doRun();
+
+			// remember we clicked on that item
+			if (isChecked()) {
+				fMemento.putString(LogView.P_IMPORT_LOG, getId());
+			}
+		}
+
+		@Override
+		public boolean equals(Object o) {
+			if (o instanceof ImportConfigurationLogAction) {
+				ImportConfigurationLogAction action = (ImportConfigurationLogAction) o;
+				return name.equals(action.name) && location.equals(action.name);
+			}
+
+			return false;
+		}
+	}
+
+	public ImportLogAction(LogView logView, String text, IMemento memento) {
+		super(text);
+		this.logView = logView;
+		this.fMemento = memento;
+		setMenuCreator(this);
+	}
+
+	@Override
+	public void run() {
+		// by default import file selected by user
+		logView.handleImport();
+	}
+
+	@Override
+	public Menu getMenu(Control parent) {
+		if (menuUpdateNeeded(toolbarMenu)) {
+			toolbarMenu = new Menu(parent);
+			createMenuItems(toolbarMenu);
+		}
+		return toolbarMenu;
+	}
+
+	@Override
+	public Menu getMenu(Menu parent) {
+		if (menuUpdateNeeded(popupMenu)) {
+			popupMenu = new Menu(parent);
+			createMenuItems(popupMenu);
+		}
+		return popupMenu;
+	}
+
+	/**
+	 * Returns whether menu should be updated or not. Menu should be updated
+	 * if either number of actions or any of actions has been changed.
+	 * @return true if menu should be updated, false otherwise
+	 */
+	private boolean menuUpdateNeeded(Menu menu) {
+		boolean result = false;
+
+		ImportConfigurationLogAction[] currActions = getLogActions();
+
+		if (menu == null) {
+			result = true;
+		} else if (actions == null) {
+			result = true;
+		} else if (currActions.length != actions.length) {
+			result = true;
+		} else {
+			for (int i = 0; i < currActions.length; i++) {
+				if (!currActions[i].equals(actions[i])) {
+					result = true;
+				}
+			}
+		}
+
+		if (result == true) {
+			actions = currActions;
+
+			if (toolbarMenu != null) {
+				toolbarMenu.dispose();
+				toolbarMenu = null;
+			}
+			if (popupMenu != null) {
+				popupMenu.dispose();
+				popupMenu = null;
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Returns list of all actions from LogFilesManager.
+	 * @return list of all actions from LogFilesManager
+	 */
+	private ImportConfigurationLogAction[] getLogActions() {
+		List result = new ArrayList();
+		Map sources = LogFilesManager.getLogSources();
+
+		for (Iterator j = sources.keySet().iterator(); j.hasNext();) {
+			String name = (String) j.next();
+			String location = (String) sources.get(name);
+			result.add(new ImportConfigurationLogAction(name, location));
+		}
+
+		return (ImportConfigurationLogAction[]) result.toArray(new ImportConfigurationLogAction[result.size()]);
+	}
+
+	/**
+	 * Builds menu of ImportLogAction actions from log files provided by LogFilesManager.
+	 *
+	 * @see IMenuCreator#getMenu(Control)
+	 */
+	private void createMenuItems(Menu menu) {
+		String previouslyCheckedActionId = fMemento.getString(LogView.P_IMPORT_LOG);
+		if (actions.length == 0) {
+			Action action = new Action(Messages.get().ImportLogAction_noLaunchHistory) {
+				// dummy action
+			};
+			action.setEnabled(false);
+			ActionContributionItem actionItem = new ActionContributionItem(action);
+			actionItem.fill(menu, -1);
+		} else {
+			for (int i = 0; i < actions.length; i++) {
+				actions[i].setChecked(actions[i].getId().equals(previouslyCheckedActionId) && !logView.isPlatformLogOpen());
+				ActionContributionItem item = new ActionContributionItem(actions[i]);
+				item.fill(menu, -1);
+			}
+		}
+
+		(new Separator()).fill(menu, -1);
+		ImportConfigurationLogAction importWorkspaceLogAction = new ImportConfigurationLogAction(Messages.get().ImportLogAction_reloadWorkspaceLog, Platform.getLogFileLocation().toFile().getAbsolutePath()) {
+
+			@Override
+			public void doRun() {
+				logView.setPlatformLog();
+			}
+
+		};
+		importWorkspaceLogAction.setChecked(logView.isPlatformLogOpen());
+		ActionContributionItem item = new ActionContributionItem(importWorkspaceLogAction);
+		item.fill(menu, -1);
+	}
+
+	@Override
+	public void dispose() {
+		if (toolbarMenu != null) {
+			toolbarMenu.dispose();
+			toolbarMenu = null;
+		}
+		if (popupMenu != null) {
+			popupMenu.dispose();
+			popupMenu = null;
+		}
+	}
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
index f4d10e9..dd9c000 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogEntry.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2013 IBM Corporation and others.
+ * Copyright (c) 2000, 2014 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
@@ -8,7 +8,7 @@
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 209474, 207344
- *     Arnaud Mergey <a_mergey@yahoo.fr> 			  - RAP port
+ *     Eike Stepper <stepper@esc-net.de>              - bug 429372
  *******************************************************************************/
 package org.eclipse.ui.internal.views.log;
 
@@ -181,16 +181,12 @@
 		return "?"; //$NON-NLS-1$
 	}
 
-	/* (non-Javadoc)
-	 * @see java.lang.Object#toString()
-	 */
+	@Override
 	public String toString() {
 		return getSeverityText();
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.log.AbstractEntry#getLabel(java.lang.Object)
-	 */
+	@Override
 	public String getLabel(Object obj) {
 		return getSeverityText();
 	}
@@ -251,7 +247,7 @@
 	 * Adds the given token to the given buffer, adding a space as needed
 	 * @param buffer
 	 * @param token
-	 * 
+	 *
 	 * @since 3.6
 	 */
 	void appendToken(StringBuffer buffer, String token) {
@@ -319,7 +315,7 @@
 	}
 
 	/**
-	 * Sets the stack to the given stack value. 
+	 * Sets the stack to the given stack value.
 	 * No validation is performed on the new value.
 	 * @param stack
 	 */
@@ -347,8 +343,8 @@
 		fDate = new Date();
 		fDateString = LOCAL_SDF.format(fDate);
 		message = status.getMessage();
-		Throwable throwable = status.getException();
 		this.session = session;
+		Throwable throwable = status.getException();
 		if (throwable != null) {
 			StringWriter swriter = new StringWriter();
 			PrintWriter pwriter = new PrintWriter(swriter);
@@ -365,13 +361,12 @@
 		}
 	}
 
-	/* (non-Javadoc)
-	 * @see org.eclipse.ui.internal.views.log.AbstractEntry#write(java.io.PrintWriter)
-	 */
+	@Override
 	public void write(PrintWriter writer) {
 		if (session != null) {
 			writer.println(session.getSessionData());
 		}
+		writer.println(pluginId);
 		writer.println(getSeverityText());
 		if (fDate != null) {
 			writer.println(getDate());
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogFilesManager.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogFilesManager.java
index da5f335..069da00 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogFilesManager.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogFilesManager.java
@@ -1,57 +1,57 @@
-/*******************************************************************************

- * Copyright (c) 2008 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.util.*;

-

-/**

- * Manages the log file providers.

- * One adds log file provider to let Log View know where to find log files.

- */

-public class LogFilesManager {

-

-	private static List logFileProviders = new ArrayList();

-

-	/**

-	 * Adds log file provider.

-	 * Has no effect if an identical provider is already registered. 

-	 */

-	public static void addLogFileProvider(ILogFileProvider provider) {

-		if (!logFileProviders.contains(provider)) {

-			logFileProviders.add(provider);

-		}

-	}

-

-	/**

-	 * Removes log file provider.

-	 * Has no effect if an identical provider is already removed.

-	 */

-	public static void removeLogFileProvider(ILogFileProvider provider) {

-		logFileProviders.remove(provider);

-	}

-

-	/**

-	 * Returns the list of logs.

-	 */

-	static Map getLogSources() {

-		ILogFileProvider[] providers = (ILogFileProvider[]) logFileProviders.toArray(new ILogFileProvider[logFileProviders.size()]);

-		Map result = new HashMap(providers.length);

-

-		for (int i = 0; i < providers.length; i++) {

-			ILogFileProvider provider = providers[i];

-

-			Map sources = provider.getLogSources();

-			result.putAll(sources);

-		}

-

-		return result;

-	}

-}

+/*******************************************************************************
+ * Copyright (c) 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import java.util.*;
+
+/**
+ * Manages the log file providers.
+ * One adds log file provider to let Log View know where to find log files.
+ */
+public class LogFilesManager {
+
+	private static List logFileProviders = new ArrayList();
+
+	/**
+	 * Adds log file provider.
+	 * Has no effect if an identical provider is already registered.
+	 */
+	public static void addLogFileProvider(ILogFileProvider provider) {
+		if (!logFileProviders.contains(provider)) {
+			logFileProviders.add(provider);
+		}
+	}
+
+	/**
+	 * Removes log file provider.
+	 * Has no effect if an identical provider is already removed.
+	 */
+	public static void removeLogFileProvider(ILogFileProvider provider) {
+		logFileProviders.remove(provider);
+	}
+
+	/**
+	 * Returns the list of logs.
+	 */
+	static Map getLogSources() {
+		ILogFileProvider[] providers = (ILogFileProvider[]) logFileProviders.toArray(new ILogFileProvider[logFileProviders.size()]);
+		Map result = new HashMap(providers.length);
+
+		for (int i = 0; i < providers.length; i++) {
+			ILogFileProvider provider = providers[i];
+
+			Map sources = provider.getLogSources();
+			result.putAll(sources);
+		}
+
+		return result;
+	}
+}
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
index f90474b..13101b9 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogReader.java
@@ -212,7 +212,7 @@
 
 	/**
 	 * Adds entry to the list if it's not filtered. Removes entries exceeding the count limit.
-	 * 
+	 *
 	 * @param entry
 	 * @param entries
 	 * @param memento
@@ -233,7 +233,7 @@
 
 	/**
 	 * Returns whether given entry is logged (true) or filtered (false).
-	 * 
+	 *
 	 * @param entry
 	 * @param memento
 	 * @return is entry logged or filtered
diff --git a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
index 93857cf..cf1febc 100644
--- a/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
+++ b/bundles/org.eclipse.rap.ui.views.log/src/org/eclipse/ui/internal/views/log/LogSession.java
@@ -1,81 +1,78 @@
-/*******************************************************************************

- * 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

- * http://www.eclipse.org/legal/epl-v10.html

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344

- *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648 

- *     Arnaud Mergey <a_mergey@yahoo.fr> 			  - RAP port

- *******************************************************************************/

-package org.eclipse.ui.internal.views.log;

-

-import java.io.PrintWriter;

-import java.text.ParseException;

-import java.text.SimpleDateFormat;

-import java.util.Date;

-

-/**

- * Group of entries with additional Session data.

- */

-public class LogSession extends Group {

-

-	/**

-	 * Describes the !SESSION header name

-	 * 

-	 * @since 3.5

-	 */

-	public static final String SESSION = "!SESSION"; //$NON-NLS-1$

-	private String sessionData;

-	private Date date;

-

-	public LogSession() {

-		super(null);

-	}

-

-	public Date getDate() {

-		return date;

-	}

-

-	public void setDate(String dateString) {

-		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$

-		try {

-			date = formatter.parse(dateString);

-		} catch (ParseException e) { // do nothing

-		}

-	}

-

-	public String getSessionData() {

-		return sessionData;

-	}

-

-	void setSessionData(String data) {

-		this.sessionData = data;

-	}

-

-	public void processLogLine(String line) {

-		// process "!SESSION <dateUnknownFormat> ----------------------------"

-		if (line.startsWith(SESSION)) {

-			line = line.substring(SESSION.length()).trim(); // strip "!SESSION "

-			int delim = line.indexOf("----"); //$NON-NLS-1$ // single "-" may be in date, so take few for sure

-			if (delim == -1) {

-				return;

-			}

-			String dateBuffer = line.substring(0, delim).trim();

-			setDate(dateBuffer);

-		}

-	}

-

-	public void write(PrintWriter writer) {

-		writer.write(sessionData);

-		writer.println();

-		super.write(writer);

-	}

-

-	public String toString() {

-		return Messages.get().LogViewLabelProvider_Session;

-	}

-}

+/*******************************************************************************
+ * Copyright (c) 2000, 2008 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
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *     Jacek Pospychala <jacek.pospychala@pl.ibm.com> - bugs 202583, 207344
+ *     Benjamin Cabe <benjamin.cabe@anyware-tech.com> - bug 218648
+ *     Arnaud Mergey - <a_mergey@yahoo.fr>
+ *******************************************************************************/
+package org.eclipse.ui.internal.views.log;
+
+import com.ibm.icu.text.SimpleDateFormat;
+import java.io.PrintWriter;
+import java.text.ParseException;
+import java.util.Date;
+
+/**
+ * Group of entries with additional Session data.
+ */
+public class LogSession extends Group {
+
+	/**
+	 * Describes the !SESSION header name
+	 *
+	 * @since 3.5
+	 */
+	public static final String SESSION = "!SESSION"; //$NON-NLS-1$
+	private String sessionData;
+	private Date date;
+
+	public LogSession() {
+		super(Messages.get().LogViewLabelProvider_Session);
+	}
+
+	public Date getDate() {
+		return date;
+	}
+
+	public void setDate(String dateString) {
+		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); //$NON-NLS-1$