diff options
author | slewis | 2007-10-15 18:40:28 +0000 |
---|---|---|
committer | slewis | 2007-10-15 18:40:28 +0000 |
commit | 3d898ee44367b5764dd9736b82915183ad8dc028 (patch) | |
tree | 0f664de019a964c2d2050160acc03f1fbf57663c /providers/bundles | |
parent | 0c194b0d4147bbced48ce3ee11f9a223dc1e3386 (diff) | |
download | org.eclipse.ecf-3d898ee44367b5764dd9736b82915183ad8dc028.tar.gz org.eclipse.ecf-3d898ee44367b5764dd9736b82915183ad8dc028.tar.xz org.eclipse.ecf-3d898ee44367b5764dd9736b82915183ad8dc028.zip |
Cleaned up code. by correcting warnings from equinox jdt, jdt ui prefs.
Diffstat (limited to 'providers/bundles')
11 files changed, 555 insertions, 216 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.core.prefs b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.core.prefs index 20ba83fdc..1092bf69f 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.core.prefs +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.core.prefs @@ -1,7 +1,331 @@ -#Mon Sep 11 15:23:16 EDT 2006 +#Wed Oct 10 22:18:36 EDT 2007 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.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +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=disabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.1 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.3 +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.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=error +org.eclipse.jdt.core.compiler.problem.emptyStatement=warning +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +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.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=private +org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=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.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.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.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=warning +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unsafeTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +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.varargsArgumentNeedCast=warning org.eclipse.jdt.core.compiler.source=1.3 +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_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_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_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.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=false +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=false +org.eclipse.jdt.core.formatter.comment.format_line_comments=false +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false +org.eclipse.jdt.core.formatter.comment.indent_root_tags=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=do not insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.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.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +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_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_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_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_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_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_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_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.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.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=false +org.eclipse.jdt.core.formatter.tabulation.char=tab +org.eclipse.jdt.core.formatter.tabulation.size=4 +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.incompatibleJDKLevel=ignore +org.eclipse.jdt.core.incompleteClasspath=error diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.ui.prefs b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..9bb86c1d3 --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,57 @@ +#Wed Oct 10 22:18:36 EDT 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.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_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.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 diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.pde.prefs b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..6686ccd10 --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/.settings/org.eclipse.pde.prefs @@ -0,0 +1,3 @@ +#Thu Apr 19 20:30:05 GMT-08:00 2007 +compilers.use-project=true +eclipse.preferences.version=1 diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF b/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF index 1db681e7f..bccef7236 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/META-INF/MANIFEST.MF @@ -18,7 +18,8 @@ Require-Bundle: org.eclipse.equinox.common, org.eclipse.ecf.sharedobject, org.eclipse.ecf.datashare, org.eclipse.ecf.provider -Import-Package: org.osgi.framework;version="1.3.0", +Import-Package: org.eclipse.osgi.util;version="1.1.0", + org.osgi.framework;version="1.3.0", org.osgi.service.log;version="1.3.0", org.osgi.util.tracker;version="1.3.2" diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java index d0f605a74..f164fc076 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Activator.java @@ -11,8 +11,10 @@ package org.eclipse.ecf.internal.provider.datashare; +import org.eclipse.core.runtime.IAdapterManager; import org.eclipse.core.runtime.IStatus; import org.eclipse.ecf.core.util.LogHelper; +import org.eclipse.ecf.core.util.PlatformHelper; import org.osgi.framework.BundleActivator; import org.osgi.framework.BundleContext; import org.osgi.service.log.LogService; @@ -23,15 +25,17 @@ import org.osgi.util.tracker.ServiceTracker; */ public class Activator implements BundleActivator { - public static final String PLUGIN_ID = "org.eclipse.ecf.provider.datashare"; - + public static final String PLUGIN_ID = "org.eclipse.ecf.provider.datashare"; //$NON-NLS-1$ + //The shared instance. private static Activator plugin; - + private BundleContext context = null; - + private ServiceTracker logServiceTracker = null; + private ServiceTracker adapterManagerTracker = null; + /** * The constructor. */ @@ -41,8 +45,7 @@ public class Activator implements BundleActivator { protected LogService getLogService() { if (logServiceTracker == null) { - logServiceTracker = new ServiceTracker(this.context, - LogService.class.getName(), null); + logServiceTracker = new ServiceTracker(this.context, LogService.class.getName(), null); logServiceTracker.open(); } return (LogService) logServiceTracker.getService(); @@ -51,28 +54,30 @@ public class Activator implements BundleActivator { public void log(IStatus status) { LogService logService = getLogService(); if (logService != null) { - logService.log(LogHelper.getLogCode(status), LogHelper - .getLogMessage(status), status.getException()); + logService.log(LogHelper.getLogCode(status), LogHelper.getLogMessage(status), status.getException()); } } - /** * This method is called upon plug-in activation */ - public void start(BundleContext context) throws Exception { - this.context = context; + public void start(BundleContext ctxt) throws Exception { + this.context = ctxt; } /** * This method is called when the plug-in is stopped */ - public void stop(BundleContext context) throws Exception { - this.context = null; + public void stop(BundleContext ctxt) throws Exception { if (logServiceTracker != null) { logServiceTracker.close(); logServiceTracker = null; } + if (adapterManagerTracker != null) { + adapterManagerTracker.close(); + adapterManagerTracker = null; + } + this.context = null; plugin = null; } @@ -88,4 +93,18 @@ public class Activator implements BundleActivator { return plugin; } + public IAdapterManager getAdapterManager() { + // First, try to get the adapter manager via + if (adapterManagerTracker == null) { + adapterManagerTracker = new ServiceTracker(this.context, IAdapterManager.class.getName(), null); + adapterManagerTracker.open(); + } + IAdapterManager adapterManager = (IAdapterManager) adapterManagerTracker.getService(); + // Then, if the service isn't there, try to get from Platform class via + // PlatformHelper class + if (adapterManager == null) + adapterManager = PlatformHelper.getPlatformAdapterManager(); + return adapterManager; + } + } diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Messages.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Messages.java new file mode 100644 index 000000000..57200311c --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/Messages.java @@ -0,0 +1,35 @@ +/**************************************************************************** + * Copyright (c) 2007 Composent, Inc. 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: + * Composent, Inc. - initial API and implementation + *****************************************************************************/ + +package org.eclipse.ecf.internal.provider.datashare; + +import org.eclipse.osgi.util.NLS; + +/** + * + */ +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.ecf.internal.provider.datashare.messages"; //$NON-NLS-1$ + public static String BaseChannel_EXCEPTION_BAD_RECEIVER_ID; + public static String BaseChannel_EXCEPTION_CHANNEL_CONTAINER_NULL; + public static String DatashareContainerAdapter_EXCEPTION_CREATING_ADAPTER; + public static String SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOT_CREATE_OBJECT_OF_TYPE; + public static String SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOTCREATESHAREDOBJECT; + public static String BaseChannel_EXCEPTION_RECEIVER_NULL; + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + // + } +} diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/messages.properties b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/messages.properties new file mode 100644 index 000000000..fc81d4af3 --- /dev/null +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/internal/provider/datashare/messages.properties @@ -0,0 +1,6 @@ +BaseChannel_EXCEPTION_BAD_RECEIVER_ID=Bad RECEIVER_ID_PROPERTY for replica. Cannot be cast to org.eclipse.ecf.core.identity.ID type +BaseChannel_EXCEPTION_CHANNEL_CONTAINER_NULL=channel container is null/not available +DatashareContainerAdapter_EXCEPTION_CREATING_ADAPTER=Exception in creating datashare container adapter +SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOT_CREATE_OBJECT_OF_TYPE=Cannot adapt object {0} to be of type IChannel +SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOTCREATESHAREDOBJECT=Cannot create {0}. +BaseChannel_EXCEPTION_RECEIVER_NULL=receiver channel is null/not available diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/BaseChannel.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/BaseChannel.java index a00723e7b..f857442f2 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/BaseChannel.java +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/BaseChannel.java @@ -15,34 +15,24 @@ import java.util.Map; import org.eclipse.ecf.core.events.IContainerConnectedEvent; import org.eclipse.ecf.core.events.IContainerDisconnectedEvent; import org.eclipse.ecf.core.identity.ID; -import org.eclipse.ecf.core.sharedobject.ISharedObjectTransactionConfig; -import org.eclipse.ecf.core.sharedobject.ReplicaSharedObjectDescription; -import org.eclipse.ecf.core.sharedobject.SharedObjectInitException; -import org.eclipse.ecf.core.sharedobject.TransactionSharedObject; +import org.eclipse.ecf.core.sharedobject.*; import org.eclipse.ecf.core.sharedobject.events.ISharedObjectMessageEvent; -import org.eclipse.ecf.core.util.ECFException; -import org.eclipse.ecf.core.util.Event; -import org.eclipse.ecf.core.util.IEventProcessor; -import org.eclipse.ecf.core.util.Trace; -import org.eclipse.ecf.datashare.IChannel; -import org.eclipse.ecf.datashare.IChannelContainerAdapter; -import org.eclipse.ecf.datashare.IChannelListener; -import org.eclipse.ecf.datashare.events.IChannelEvent; -import org.eclipse.ecf.datashare.events.IChannelDisconnectEvent; -import org.eclipse.ecf.datashare.events.IChannelConnectEvent; -import org.eclipse.ecf.datashare.events.IChannelMessageEvent; +import org.eclipse.ecf.core.util.*; +import org.eclipse.ecf.datashare.*; +import org.eclipse.ecf.datashare.events.*; import org.eclipse.ecf.internal.provider.datashare.Activator; +import org.eclipse.ecf.internal.provider.datashare.Messages; public class BaseChannel extends TransactionSharedObject implements IChannel { - public static final String RECEIVER_ID_PROPERTY = BaseChannel.class - .getName(); + public static final String RECEIVER_ID_PROPERTY = BaseChannel.class.getName(); static class ChannelMsg implements Serializable { private static final long serialVersionUID = 9065358269778864152L; byte[] channelData = null; ChannelMsg() { + // } ChannelMsg(byte[] data) { @@ -54,8 +44,8 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { } public String toString() { - StringBuffer buf = new StringBuffer("BaseChannel.ChannelMsg["); - buf.append("data=").append(getData()).append("]"); + StringBuffer buf = new StringBuffer("BaseChannel.ChannelMsg["); //$NON-NLS-1$ + buf.append("data=").append(getData()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ return buf.toString(); } } @@ -71,8 +61,7 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { * @param listener * the listener associated with this channel instance */ - public BaseChannel(ISharedObjectTransactionConfig config, - IChannelListener listener) { + public BaseChannel(ISharedObjectTransactionConfig config, IChannelListener listener) { super(config); setChannelListener(listener); } @@ -111,26 +100,21 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { addEventProcessor(new IEventProcessor() { public boolean processEvent(Event event) { - trace("processEvent(" + event + ")"); + trace("processEvent(" + event + ")"); //$NON-NLS-1$ //$NON-NLS-2$ IChannelListener l = getListener(); if (event instanceof IContainerConnectedEvent) { if (l != null) - l.handleChannelEvent(createChannelGroupJoinEvent(true, - ((IContainerConnectedEvent) event) - .getTargetID())); + l.handleChannelEvent(createChannelGroupJoinEvent(true, ((IContainerConnectedEvent) event).getTargetID())); } else if (event instanceof IContainerDisconnectedEvent) { if (l != null) - l.handleChannelEvent(createChannelGroupDepartEvent( - true, ((IContainerDisconnectedEvent) event) - .getTargetID())); + l.handleChannelEvent(createChannelGroupDepartEvent(true, ((IContainerDisconnectedEvent) event).getTargetID())); } else if (event instanceof ISharedObjectMessageEvent) { - BaseChannel.this - .handleMessageEvent((ISharedObjectMessageEvent) event); + BaseChannel.this.handleMessageEvent((ISharedObjectMessageEvent) event); } return false; } }); - trace("initialize()"); + trace("initialize()"); //$NON-NLS-1$ } @@ -140,12 +124,11 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { public Object getAdapter(Class clazz) { if (clazz.equals(IChannel.class)) { return this; - } else - return super.getAdapter(clazz); + } + return super.getAdapter(clazz); } - private IChannelConnectEvent createChannelGroupJoinEvent( - final boolean hasJoined, final ID targetID) { + IChannelConnectEvent createChannelGroupJoinEvent(final boolean hasJoined, final ID targetID) { return new IChannelConnectEvent() { private static final long serialVersionUID = -1085237280463725283L; @@ -158,16 +141,14 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { } public String toString() { - StringBuffer buf = new StringBuffer("ChannelConnectEvent["); - buf.append("channelid=").append(getChannelID()).append( - ";targetid=").append(getTargetID()).append("]"); + StringBuffer buf = new StringBuffer("ChannelConnectEvent["); //$NON-NLS-1$ + buf.append("channelid=").append(getChannelID()).append(";targetid=").append(getTargetID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return buf.toString(); } }; } - private IChannelDisconnectEvent createChannelGroupDepartEvent( - final boolean hasJoined, final ID targetID) { + IChannelDisconnectEvent createChannelGroupDepartEvent(final boolean hasJoined, final ID targetID) { return new IChannelDisconnectEvent() { private static final long serialVersionUID = -1085237280463725283L; @@ -180,15 +161,14 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { } public String toString() { - StringBuffer buf = new StringBuffer("ChannelDisconnectEvent["); - buf.append("channelid=").append(getChannelID()).append( - ";targetid=").append(getTargetID()).append("]"); + StringBuffer buf = new StringBuffer("ChannelDisconnectEvent["); //$NON-NLS-1$ + buf.append("channelid=").append(getChannelID()).append(";targetid=").append(getTargetID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ return buf.toString(); } }; } - private Event handleMessageEvent(final ISharedObjectMessageEvent event) { + Event handleMessageEvent(final ISharedObjectMessageEvent event) { Object eventData = event.getData(); ChannelMsg channelMsg = null; IChannelListener l = getListener(); @@ -214,11 +194,8 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { } public String toString() { - StringBuffer buf = new StringBuffer( - "ChannelMessageEvent["); - buf.append("channelid=").append(getChannelID()).append( - ";fromid=").append(getFromContainerID()) - .append(";data=").append(getData()).append("]"); + StringBuffer buf = new StringBuffer("ChannelMessageEvent["); //$NON-NLS-1$ + buf.append("channelid=").append(getChannelID()).append(";fromid=").append(getFromContainerID()).append(";data=").append(getData()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ return buf.toString(); } }); @@ -249,7 +226,7 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { try { getContext().sendMessage(receiver, new ChannelMsg(message)); } catch (Exception e) { - throw new ECFException("send message exception", e); + throw new ECFException("send message exception", e); //$NON-NLS-1$ } } @@ -283,13 +260,9 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { */ protected void receiveUndeliveredChannelEvent(IChannelEvent channelEvent) { if (isPrimary()) - trace("host.receiveUndeliveredChannelEvent(" + channelEvent - + ";containerid=" + getContext().getLocalContainerID() - + ")"); + trace("host.receiveUndeliveredChannelEvent(" + channelEvent + ";containerid=" + getContext().getLocalContainerID() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ else - trace("replica.receiveUndeliveredChannelEvent(" + channelEvent - + ";containerid=" + getContext().getLocalContainerID() - + ")"); + trace("replica.receiveUndeliveredChannelEvent(" + channelEvent + ";containerid=" + getContext().getLocalContainerID() + ")"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } /** @@ -304,10 +277,8 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { * replica of this host shared object. If null, no create message * will be sent to the target container. */ - protected ReplicaSharedObjectDescription getReplicaDescription( - ID targetContainerID) { - return new ReplicaSharedObjectDescription(getClass(), getID(), - getConfig().getHomeContainerID(), getConfig().getProperties()); + protected ReplicaSharedObjectDescription getReplicaDescription(ID targetContainerID) { + return new ReplicaSharedObjectDescription(getClass(), getID(), getConfig().getHomeContainerID(), getConfig().getProperties()); } /** @@ -339,22 +310,18 @@ public class BaseChannel extends TransactionSharedObject implements IChannel { try { rcvr = (ID) properties.get(RECEIVER_ID_PROPERTY); } catch (ClassCastException e) { - throw new SharedObjectInitException( - "Bad RECEIVER_ID_PROPERTY for replica. Cannot be cast to org.eclipse.ecf.core.identity.ID type"); + throw new SharedObjectInitException(Messages.BaseChannel_EXCEPTION_BAD_RECEIVER_ID); } if (rcvr != null) { // Now...get local channel container first...throw if we can't get // it - IChannelContainerAdapter container = (IChannelContainerAdapter) getContext() - .getAdapter(IChannelContainerAdapter.class); + IChannelContainerAdapter container = (IChannelContainerAdapter) getContext().getAdapter(IChannelContainerAdapter.class); if (container == null) - throw new SharedObjectInitException( - "channel container is null/not available"); + throw new SharedObjectInitException(Messages.BaseChannel_EXCEPTION_CHANNEL_CONTAINER_NULL); // Now get receiver IChannel...throw if we can't get it final IChannel receiver = container.getChannel(rcvr); if (receiver == null) - throw new SharedObjectInitException( - "receiver channel is null/not available"); + throw new SharedObjectInitException(Messages.BaseChannel_EXCEPTION_RECEIVER_NULL); setChannelListener(receiver.getListener()); } } diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapter.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapter.java index a42e0620f..a2bcab09d 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapter.java +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapter.java @@ -12,23 +12,14 @@ package org.eclipse.ecf.provider.datashare; import java.util.Map; - -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.*; import org.eclipse.ecf.core.IContainer; -import org.eclipse.ecf.core.identity.ID; -import org.eclipse.ecf.core.identity.IDFactory; -import org.eclipse.ecf.core.identity.Namespace; -import org.eclipse.ecf.core.identity.StringID; +import org.eclipse.ecf.core.identity.*; import org.eclipse.ecf.core.util.ECFException; import org.eclipse.ecf.core.util.Trace; -import org.eclipse.ecf.datashare.IChannel; -import org.eclipse.ecf.datashare.IChannelConfig; -import org.eclipse.ecf.datashare.IChannelContainerAdapter; -import org.eclipse.ecf.datashare.IChannelContainerListener; -import org.eclipse.ecf.datashare.IChannelListener; -import org.eclipse.ecf.internal.provider.datashare.Activator; -import org.eclipse.ecf.internal.provider.datashare.DatashareProviderDebugOptions; +import org.eclipse.ecf.datashare.*; +import org.eclipse.ecf.internal.provider.datashare.*; +import org.eclipse.ecf.internal.provider.datashare.Messages; import org.eclipse.ecf.provider.generic.SOContainer; public class DatashareContainerAdapter implements IChannelContainerAdapter { @@ -50,25 +41,12 @@ public class DatashareContainerAdapter implements IChannelContainerAdapter { protected void initialize() { try { - this.delegateID = IDFactory.getDefault().createStringID( - SharedObjectDatashareContainerAdapter.class.getName()); + this.delegateID = IDFactory.getDefault().createStringID(SharedObjectDatashareContainerAdapter.class.getName()); this.delegate = new SharedObjectDatashareContainerAdapter(); - this.container.getSharedObjectManager().addSharedObject(delegateID, - delegate, null); + this.container.getSharedObjectManager().addSharedObject(delegateID, delegate, null); } catch (Exception e) { - Trace.catching(Activator.PLUGIN_ID, - DatashareProviderDebugOptions.EXCEPTIONS_CATCHING, - DatashareContainerAdapter.class, - "DatashareContainerAdapter.initialize", e); - Activator - .getDefault() - .log( - new Status( - IStatus.ERROR, - Activator.PLUGIN_ID, - SO_CREATION_ERROR, - "Exception in creating datashare container adapter", - e)); + Trace.catching(Activator.PLUGIN_ID, DatashareProviderDebugOptions.EXCEPTIONS_CATCHING, DatashareContainerAdapter.class, "DatashareContainerAdapter.initialize", e); //$NON-NLS-1$ + Activator.getDefault().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, SO_CREATION_ERROR, Messages.DatashareContainerAdapter_EXCEPTION_CREATING_ADAPTER, e)); } } @@ -77,14 +55,11 @@ public class DatashareContainerAdapter implements IChannelContainerAdapter { * * @see org.eclipse.ecf.datashare.IChannelContainerAdapter#createChannel(org.eclipse.ecf.datashare.IChannelConfig) */ - public IChannel createChannel(final ID newID, - final IChannelListener listener, final Map properties) - throws ECFException { + public IChannel createChannel(final ID newID, final IChannelListener listener, final Map properties) throws ECFException { return delegate.createChannel(newID, listener, properties); } - public IChannel createChannel(IChannelConfig newChannelConfig) - throws ECFException { + public IChannel createChannel(IChannelConfig newChannelConfig) throws ECFException { return delegate.createChannel(newChannelConfig); } @@ -112,8 +87,7 @@ public class DatashareContainerAdapter implements IChannelContainerAdapter { * @see org.eclipse.ecf.datashare.IChannelContainerAdapter#getChannelNamespace() */ public Namespace getChannelNamespace() { - return IDFactory.getDefault().getNamespaceByName( - StringID.class.getName()); + return IDFactory.getDefault().getNamespaceByName(StringID.class.getName()); } public void addListener(IChannelContainerListener listener) { @@ -127,7 +101,7 @@ public class DatashareContainerAdapter implements IChannelContainerAdapter { public Object getAdapter(Class adapter) { if (adapter != null && adapter.equals(IContainer.class)) return container; - else - return null; + final IAdapterManager adapterManager = Activator.getDefault().getAdapterManager(); + return (adapterManager == null) ? null : adapterManager.loadAdapter(this, adapter.getName()); } } diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapterFactory.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapterFactory.java index f4e2928ef..24d2ae6d5 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapterFactory.java +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/DatashareContainerAdapterFactory.java @@ -11,13 +11,10 @@ package org.eclipse.ecf.provider.datashare; import org.eclipse.ecf.core.identity.ID; -import org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory; -import org.eclipse.ecf.core.sharedobject.ISharedObject; -import org.eclipse.ecf.core.sharedobject.ISharedObjectContainer; +import org.eclipse.ecf.core.sharedobject.*; import org.eclipse.ecf.datashare.IChannelContainerAdapter; -public class DatashareContainerAdapterFactory extends - AbstractSharedObjectContainerAdapterFactory { +public class DatashareContainerAdapterFactory extends AbstractSharedObjectContainerAdapterFactory { /* (non-Javadoc) * @see org.eclipse.ecf.core.sharedobject.AbstractSharedObjectContainerAdapterFactory#createAdapter(org.eclipse.ecf.core.sharedobject.ISharedObjectContainer, java.lang.Class, org.eclipse.ecf.core.identity.ID) @@ -25,11 +22,12 @@ public class DatashareContainerAdapterFactory extends protected ISharedObject createAdapter(ISharedObjectContainer container, Class adapterType, ID adapterID) { if (adapterType.equals(IChannelContainerAdapter.class)) { return new SharedObjectDatashareContainerAdapter(); - } else return null; + } + return null; } public Class[] getAdapterList() { - return new Class[] { IChannelContainerAdapter.class }; + return new Class[] {IChannelContainerAdapter.class}; } } diff --git a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/SharedObjectDatashareContainerAdapter.java b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/SharedObjectDatashareContainerAdapter.java index 8ca87e394..8b31226e1 100644 --- a/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/SharedObjectDatashareContainerAdapter.java +++ b/providers/bundles/org.eclipse.ecf.provider.datashare/src/org/eclipse/ecf/provider/datashare/SharedObjectDatashareContainerAdapter.java @@ -12,45 +12,22 @@ package org.eclipse.ecf.provider.datashare; import java.lang.reflect.Constructor; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -import org.eclipse.ecf.core.identity.ID; -import org.eclipse.ecf.core.identity.IDFactory; -import org.eclipse.ecf.core.identity.Namespace; -import org.eclipse.ecf.core.identity.StringID; -import org.eclipse.ecf.core.sharedobject.BaseSharedObject; -import org.eclipse.ecf.core.sharedobject.ISharedObject; -import org.eclipse.ecf.core.sharedobject.ISharedObjectTransactionConfig; -import org.eclipse.ecf.core.sharedobject.SharedObjectCreateException; -import org.eclipse.ecf.core.sharedobject.SharedObjectDescription; -import org.eclipse.ecf.core.sharedobject.SharedObjectFactory; -import org.eclipse.ecf.core.sharedobject.SharedObjectInitException; -import org.eclipse.ecf.core.sharedobject.SharedObjectTypeDescription; +import java.util.*; +import org.eclipse.ecf.core.identity.*; +import org.eclipse.ecf.core.sharedobject.*; import org.eclipse.ecf.core.sharedobject.events.ISharedObjectActivatedEvent; import org.eclipse.ecf.core.sharedobject.events.ISharedObjectDeactivatedEvent; -import org.eclipse.ecf.core.util.ECFException; -import org.eclipse.ecf.core.util.Event; -import org.eclipse.ecf.core.util.IEventProcessor; -import org.eclipse.ecf.datashare.IChannel; -import org.eclipse.ecf.datashare.IChannelConfig; -import org.eclipse.ecf.datashare.IChannelContainerAdapter; -import org.eclipse.ecf.datashare.IChannelContainerListener; -import org.eclipse.ecf.datashare.IChannelListener; -import org.eclipse.ecf.datashare.events.IChannelContainerChannelActivatedEvent; -import org.eclipse.ecf.datashare.events.IChannelContainerChannelDeactivatedEvent; -import org.eclipse.ecf.datashare.events.IChannelContainerEvent; - -public class SharedObjectDatashareContainerAdapter extends BaseSharedObject - implements IChannelContainerAdapter { +import org.eclipse.ecf.core.util.*; +import org.eclipse.ecf.datashare.*; +import org.eclipse.ecf.datashare.events.*; +import org.eclipse.ecf.internal.provider.datashare.Messages; +import org.eclipse.osgi.util.NLS; + +public class SharedObjectDatashareContainerAdapter extends BaseSharedObject implements IChannelContainerAdapter { protected static final int DEFAULT_TRANSACTION_WAIT = 30000; - protected List channelContainerListeners = Collections - .synchronizedList(new ArrayList()); + protected List channelContainerListeners = Collections.synchronizedList(new ArrayList()); protected void initialize() throws SharedObjectInitException { super.initialize(); @@ -69,12 +46,9 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject } public String toString() { - StringBuffer buf = new StringBuffer( - "ChannelActivatedEvent["); - buf.append("channelid=").append( - soae.getActivatedID()).append(";"); - buf.append("containerid=").append( - soae.getLocalContainerID()).append("]"); + StringBuffer buf = new StringBuffer("ChannelActivatedEvent["); //$NON-NLS-1$ + buf.append("channelid=").append(soae.getActivatedID()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("containerid=").append(soae.getLocalContainerID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ return buf.toString(); } }); @@ -91,12 +65,9 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject } public String toString() { - StringBuffer buf = new StringBuffer( - "ChannelDeactivatedEvent["); - buf.append("channelid=").append( - sode.getDeactivatedID()).append(";"); - buf.append("containerid=").append( - sode.getLocalContainerID()).append("]"); + StringBuffer buf = new StringBuffer("ChannelDeactivatedEvent["); //$NON-NLS-1$ + buf.append("channelid=").append(sode.getDeactivatedID()).append(";"); //$NON-NLS-1$ //$NON-NLS-2$ + buf.append("containerid=").append(sode.getLocalContainerID()).append("]"); //$NON-NLS-1$ //$NON-NLS-2$ return buf.toString(); } }); @@ -109,8 +80,7 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject protected void fireChannelContainerListeners(IChannelContainerEvent event) { synchronized (channelContainerListeners) { for (Iterator i = channelContainerListeners.iterator(); i.hasNext();) { - IChannelContainerListener l = (IChannelContainerListener) i - .next(); + IChannelContainerListener l = (IChannelContainerListener) i.next(); if (l != null) l.handleChannelContainerEvent(event); } @@ -122,9 +92,7 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject * * @see org.eclipse.ecf.datashare.IChannelContainerAdapter#createChannel(org.eclipse.ecf.datashare.IChannelConfig) */ - public IChannel createChannel(final ID newID, - final IChannelListener listener, final Map properties) - throws ECFException { + public IChannel createChannel(final ID newID, final IChannelListener listener, final Map properties) throws ECFException { return createChannel(new IChannelConfig() { public IChannelListener getListener() { return listener; @@ -144,57 +112,48 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject }); } - protected SharedObjectDescription createChannelSharedObjectDescription( - final IChannelConfig channelConfig) throws ECFException { - return new SharedObjectDescription(BaseChannel.class, channelConfig - .getID(), channelConfig.getProperties()); + /** + * @param channelConfig + * @return SharedObjectDescription a non-<code>null</code> instance. + * @throws ECFException not thrown by this implementation. + */ + protected SharedObjectDescription createChannelSharedObjectDescription(final IChannelConfig channelConfig) throws ECFException { + return new SharedObjectDescription(BaseChannel.class, channelConfig.getID(), channelConfig.getProperties()); } protected ISharedObjectTransactionConfig createChannelSharedObjectTransactionConfig() { return null; } - protected ISharedObject createSharedObject( - SharedObjectTypeDescription typeDescription, - ISharedObjectTransactionConfig transactionConfig, - IChannelListener listener) throws SharedObjectCreateException { + protected ISharedObject createSharedObject(SharedObjectTypeDescription typeDescription, ISharedObjectTransactionConfig transactionConfig, IChannelListener listener) throws SharedObjectCreateException { try { Class clazz = Class.forName(typeDescription.getClassName()); - Constructor cons = clazz.getDeclaredConstructor(new Class[] { - ISharedObjectTransactionConfig.class, - IChannelListener.class }); - return (ISharedObject) cons.newInstance(new Object[] { - transactionConfig, listener }); + Constructor cons = clazz.getDeclaredConstructor(new Class[] {ISharedObjectTransactionConfig.class, IChannelListener.class}); + return (ISharedObject) cons.newInstance(new Object[] {transactionConfig, listener}); } catch (Exception e) { - throw new SharedObjectCreateException( - "Cannot create" - + typeDescription.getClassName(), e); + throw new SharedObjectCreateException(NLS.bind(Messages.SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOTCREATESHAREDOBJECT, typeDescription.getClassName()), e); } } - public IChannel createChannel(IChannelConfig newChannelConfig) - throws ECFException { + public IChannel createChannel(IChannelConfig newChannelConfig) throws ECFException { SharedObjectDescription sodesc = createChannelSharedObjectDescription(newChannelConfig); SharedObjectTypeDescription sotypedesc = sodesc.getTypeDescription(); IChannelListener listener = newChannelConfig.getListener(); ISharedObjectTransactionConfig transactionConfig = createChannelSharedObjectTransactionConfig(); ISharedObject so = null; if (sotypedesc.getName() != null) { - so = SharedObjectFactory.getDefault().createSharedObject( - sotypedesc, new Object[] { transactionConfig, listener }); + so = SharedObjectFactory.getDefault().createSharedObject(sotypedesc, new Object[] {transactionConfig, listener}); } else { so = createSharedObject(sotypedesc, transactionConfig, listener); } IChannel channel = (IChannel) so.getAdapter(IChannel.class); if (channel == null) - throw new SharedObjectCreateException("Cannot adapt object " - + channel + " to be of type IChannel"); + throw new SharedObjectCreateException(NLS.bind(Messages.SharedObjectDatashareContainerAdapter_EXCEPTION_CANNOT_CREATE_OBJECT_OF_TYPE, channel)); ID newID = sodesc.getID(); if (newID == null) newID = IDFactory.getDefault().createGUID(); // Now add channel to container...this will block - getContext().getSharedObjectManager().addSharedObject(newID, so, - sodesc.getProperties()); + getContext().getSharedObjectManager().addSharedObject(newID, so, sodesc.getProperties()); return channel; } @@ -206,9 +165,7 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject public IChannel getChannel(ID channelID) { if (channelID == null || channelID.equals(getID())) return null; - else - return (IChannel) getContext().getSharedObjectManager() - .getSharedObject(channelID); + return (IChannel) getContext().getSharedObjectManager().getSharedObject(channelID); } /* @@ -219,8 +176,7 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject public boolean removeChannel(ID channelID) { if (channelID == null || channelID.equals(getID())) return false; - ISharedObject o = getContext().getSharedObjectManager() - .removeSharedObject(channelID); + ISharedObject o = getContext().getSharedObjectManager().removeSharedObject(channelID); return (o != null); } @@ -230,8 +186,7 @@ public class SharedObjectDatashareContainerAdapter extends BaseSharedObject * @see org.eclipse.ecf.datashare.IChannelContainerAdapter#getChannelNamespace() */ public Namespace getChannelNamespace() { - return IDFactory.getDefault().getNamespaceByName( - StringID.class.getName()); + return IDFactory.getDefault().getNamespaceByName(StringID.class.getName()); } public void addListener(IChannelContainerListener listener) { |