diff options
Diffstat (limited to 'framework')
27 files changed, 838 insertions, 123 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.core.prefs b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.core.prefs index 652b088ac..e9ff802f1 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.core.prefs +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.core.prefs @@ -1,69 +1,330 @@ -#Thu Nov 01 22:09:18 PDT 2007 +#Mon Oct 15 23:38:56 PDT 2007 eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.cleanOutputFolder=clean +org.eclipse.jdt.core.builder.duplicateResourceTask=warning +org.eclipse.jdt.core.builder.invalidClasspath=abort +org.eclipse.jdt.core.builder.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=disabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore -org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore -org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +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=ignore +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning org.eclipse.jdt.core.compiler.problem.invalidJavadoc=error -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public -org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +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=error +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=ignore -org.eclipse.jdt.core.compiler.problem.nullReference=ignore +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning -org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore -org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore -org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +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=ignore +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=ignore -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +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=ignore -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedImport=warning -org.eclipse.jdt.core.compiler.problem.unusedLabel=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.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.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/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.ui.prefs b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..9bb86c1d3 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.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/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.pde.prefs b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..6686ccd10 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/.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/framework/bundles/org.eclipse.ecf.presence.collab.ui/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.presence.collab.ui/META-INF/MANIFEST.MF index 8c8ed8b3b..b5db8c839 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/META-INF/MANIFEST.MF +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/META-INF/MANIFEST.MF @@ -13,11 +13,14 @@ Require-Bundle: org.eclipse.ui, org.eclipse.ecf.presence, org.eclipse.ecf.presence.ui, org.eclipse.ui.console, - org.eclipse.jface.text + org.eclipse.jface.text, + org.eclipse.ecf.ui;bundle-version="1.3.0" Eclipse-LazyStart: true Export-Package: org.eclipse.ecf.internal.presence.collab.ui;x-internal:=true, org.eclipse.ecf.internal.presence.collab.ui.view;x-internal:=true, org.eclipse.ecf.presence.collab.ui, org.eclipse.ecf.presence.collab.ui.console, + org.eclipse.ecf.presence.collab.ui.screencapture, org.eclipse.ecf.presence.collab.ui.url, org.eclipse.ecf.presence.collab.ui.view +Eclipse-BuddyPolicy: global diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/plugin.xml b/framework/bundles/org.eclipse.ecf.presence.collab.ui/plugin.xml index d9821e2e6..16d8a35da 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/plugin.xml +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/plugin.xml @@ -36,6 +36,25 @@ </dynamic> </menuContribution> </extension> + + <extension + point="org.eclipse.ui.menus"> + <menuContribution + locationURI="popup:org.eclipse.ecf.presence.ui.MultiRosterView?before=additions"> + <dynamic + class="org.eclipse.ecf.presence.collab.ui.screencapture.ScreenCaptureShareRosterEntryContributionItem" + id="org.eclipse.ecf.presence.collab.ui.dynamic6"> + </dynamic> + </menuContribution> + <menuContribution + locationURI="popup:org.eclipse.ecf.presence.ui.MultiRosterView?before=additions"> + <dynamic + class="org.eclipse.ecf.presence.collab.ui.screencapture.ScreenCaptureShareRosterContributionItem" + id="org.eclipse.ecf.presence.collab.ui.dynamic7"> + </dynamic> + </menuContribution> + </extension> + <extension point="org.eclipse.ecf.presence.ui.rosterViewerDropTarget"> <dropTarget diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Activator.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Activator.java index 8141e1fe5..0b5031e5d 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Activator.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Activator.java @@ -34,6 +34,7 @@ public class Activator extends AbstractUIPlugin { * The constructor */ public Activator() { + // nothing } /* @@ -41,10 +42,10 @@ public class Activator extends AbstractUIPlugin { * * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) */ - public void start(BundleContext context) throws Exception { - super.start(context); + public void start(BundleContext context1) throws Exception { + super.start(context1); plugin = this; - this.context = context; + this.context = context1; } /* @@ -52,8 +53,8 @@ public class Activator extends AbstractUIPlugin { * * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) */ - public void stop(BundleContext context) throws Exception { - super.stop(context); + public void stop(BundleContext context1) throws Exception { + super.stop(context1); if (containerManagerTracker != null) { containerManagerTracker.close(); containerManagerTracker = null; diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Messages.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Messages.java index 45c5a3a2d..3e7bc3901 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Messages.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/Messages.java @@ -22,6 +22,10 @@ public class Messages extends NLS { public static String URLShare_ENTER_URL_DIALOG_TEXT; public static String URLShare_ERROR_BROWSER_MESSAGE; public static String URLShare_ERROR_BROWSER_TITLE; + public static String ScreenCaptureShare_SCREEN_CAPTURE_RECEIVE_TITLE; + public static String ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MENU; + public static String ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_MESSAGE; + public static String ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_TITLE; public static String Share_ERROR_RECEIVE_MESSAGE; public static String Share_ERROR_RECEIVE_TITLE; public static String Share_ERROR_SEND_MESSAGE; @@ -67,5 +71,6 @@ public class Messages extends NLS { } private Messages() { + // do nothing } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/ShareReceiversECFStart.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/ShareReceiversECFStart.java index 5596ec07e..9c9c3b0c1 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/ShareReceiversECFStart.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/ShareReceiversECFStart.java @@ -27,6 +27,7 @@ import org.eclipse.ecf.core.start.IECFStart; import org.eclipse.ecf.core.util.ECFException; import org.eclipse.ecf.datashare.IChannelContainerAdapter; import org.eclipse.ecf.presence.collab.ui.console.ConsoleShare; +import org.eclipse.ecf.presence.collab.ui.screencapture.ScreenCaptureShare; import org.eclipse.ecf.presence.collab.ui.url.URLShare; import org.eclipse.ecf.presence.collab.ui.view.ViewShare; import org.eclipse.osgi.util.NLS; @@ -56,6 +57,7 @@ public class ShareReceiversECFStart implements IECFStart { URLShare.addURLShare(containerID, cca); ViewShare.addViewShare(containerID, cca); ConsoleShare.addStackShare(containerID, cca); + ScreenCaptureShare.addScreenCaptureShare(containerID, cca); } catch (ECFException e) { Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.PLUGIN_ID, IStatus.WARNING, NLS.bind(Messages.StartURLShareAndViewShare_STATUS_URLSHARE_NOT_CREATED, container.getID()), null)); } @@ -64,6 +66,7 @@ public class ShareReceiversECFStart implements IECFStart { URLShare.removeURLShare(containerID); ViewShare.removeViewShare(containerID); ConsoleShare.removeStackShare(containerID); + ScreenCaptureShare.removeScreenCaptureShare(containerID); } else if (event instanceof IContainerDisposeEvent) { containerManager.removeListener(containerManagerListener); container.removeListener(containerListener); @@ -94,6 +97,7 @@ public class ShareReceiversECFStart implements IECFStart { }; public ShareReceiversECFStart() { + // do nothing } /* (non-Javadoc) diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/messages.properties b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/messages.properties index 4fda68cea..eb5d16f0d 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/messages.properties +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/messages.properties @@ -19,6 +19,10 @@ URLShare_ENTER_URL_DEFAULT_URL=http://www.eclipse.org/ecf URLShare_ERROR_BROWSER_MESSAGE=Error opening browser URLShare_EXCEPTION_LOG_BROWSER=Exception in createBrowser URLShare_RECEIVED_URL_TITLE=Received URL +ScreenCaptureShare_SCREEN_CAPTURE_RECEIVE_TITLE=Screen capture from {0} +ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MENU=Send Screen Capture +ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_MESSAGE=To initiate screen capture, click OK, wait 5 seconds,\nand then select capture region with arrow cursor. +ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_TITLE=Screen Capture Share_ERROR_SEND_TITLE=Error sending message URLShare_RECEIVED_URL_MESSAGE=Received URL from {0}:\n\n{1}\n\nDo you want to display in browser? URLShare_ERROR_BROWSER_TITLE=Error opening browser diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogTreeContentProvider.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogTreeContentProvider.java index 6bfcedbf1..771482227 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogTreeContentProvider.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogTreeContentProvider.java @@ -19,17 +19,14 @@ import org.eclipse.ui.views.IViewCategory; import org.eclipse.ui.views.IViewDescriptor; import org.eclipse.ui.views.IViewRegistry; -public class ShowViewDialogTreeContentProvider implements - ITreeContentProvider { +public class ShowViewDialogTreeContentProvider implements ITreeContentProvider { private HashMap parents = new HashMap(); public Object[] getChildren(Object element) { if (element instanceof IViewRegistry) - return ((IViewRegistry) element) - .getCategories(); + return ((IViewRegistry) element).getCategories(); else if (element instanceof IViewCategory) { - IViewDescriptor[] children = ((IViewCategory) element) - .getViews(); + final IViewDescriptor[] children = ((IViewCategory) element).getViews(); for (int i = 0; i < children.length; ++i) parents.put(children[i], element); @@ -40,8 +37,7 @@ public class ShowViewDialogTreeContentProvider implements public Object getParent(Object element) { if (element instanceof IViewCategory) - return PlatformUI.getWorkbench() - .getViewRegistry(); + return PlatformUI.getWorkbench().getViewRegistry(); else if (element instanceof IViewDescriptor) return parents.get(element); else @@ -49,11 +45,9 @@ public class ShowViewDialogTreeContentProvider implements } public boolean hasChildren(Object element) { - if (element instanceof IViewRegistry - || element instanceof IViewCategory) + if (element instanceof IViewRegistry || element instanceof IViewCategory) return true; - else - return false; + return false; } public Object[] getElements(Object inputElement) { @@ -64,8 +58,7 @@ public class ShowViewDialogTreeContentProvider implements parents = null; } - public void inputChanged(Viewer viewer, - Object oldInput, Object newInput) { + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { parents.clear(); } }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogViewerFilter.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogViewerFilter.java index d288942dd..829ca7be3 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogViewerFilter.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/internal/presence/collab/ui/view/ShowViewDialogViewerFilter.java @@ -15,14 +15,10 @@ import org.eclipse.jface.viewers.ViewerFilter; import org.eclipse.ui.views.IViewDescriptor; public class ShowViewDialogViewerFilter extends ViewerFilter { - public boolean select(Viewer viewer, Object parentElement, - Object element) { - if (element instanceof IViewDescriptor - && "org.eclipse.ui.internal.introview" //$NON-NLS-1$ - .equals(((IViewDescriptor) element) - .getId())) + public boolean select(Viewer viewer, Object parentElement, Object element) { + if (element instanceof IViewDescriptor && "org.eclipse.ui.internal.introview" //$NON-NLS-1$ + .equals(((IViewDescriptor) element).getId())) return false; - else - return true; + return true; } }
\ No newline at end of file diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/AbstractCollabShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/AbstractCollabShare.java index 6ad5e4e0f..94837e2cd 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/AbstractCollabShare.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/AbstractCollabShare.java @@ -24,7 +24,6 @@ import org.eclipse.ecf.core.util.ECFException; import org.eclipse.ecf.datashare.AbstractShare; import org.eclipse.ecf.datashare.IChannelContainerAdapter; import org.eclipse.ecf.internal.presence.collab.ui.Activator; -import org.eclipse.jface.dialogs.MessageDialog; /** * @@ -58,30 +57,26 @@ public abstract class AbstractCollabShare extends AbstractShare { super(adapter, channelID, options); } - protected byte[] serialize(Object o) throws Exception { + public byte[] serialize(Object o) throws Exception { final ByteArrayOutputStream bos = new ByteArrayOutputStream(); final ObjectOutputStream oos = new ObjectOutputStream(bos); oos.writeObject(o); return bos.toByteArray(); } - protected Object deserialize(byte[] bytes) throws Exception { + public Object deserialize(byte[] bytes) throws Exception { final ByteArrayInputStream bins = new ByteArrayInputStream(bytes); final ObjectInputStream oins = new ObjectInputStream(bins); return oins.readObject(); } - protected void logError(String exceptionString, Throwable e) { + public void logError(String exceptionString, Throwable e) { Activator.getDefault().getLog().log(new Status(IStatus.ERROR, Activator.PLUGIN_ID, IStatus.ERROR, exceptionString, e)); } - protected void logError(IStatus status) { + public void logError(IStatus status) { Activator.getDefault().getLog().log(status); } - protected void showErrorToUser(String title, String message) { - MessageDialog.openError(null, title, message); - } - } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleRosterMenuContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleRosterMenuContributionItem.java index c078ffcbb..999423322 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleRosterMenuContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleRosterMenuContributionItem.java @@ -24,6 +24,7 @@ import org.eclipse.ui.PlatformUI; public class ConsoleRosterMenuContributionItem extends AbstractRosterMenuContributionItem { public ConsoleRosterMenuContributionItem() { + // do nothing } public ConsoleRosterMenuContributionItem(String id) { @@ -53,8 +54,10 @@ public class ConsoleRosterMenuContributionItem extends AbstractRosterMenuContrib protected AbstractRosterMenuHandler createRosterEntryHandler(IRosterEntry rosterEntry) { return new AbstractRosterMenuHandler(rosterEntry) { + /** + * @throws ExecutionException + */ public Object execute(ExecutionEvent arg0) throws ExecutionException { - // TODO Auto-generated method stub final Object s = getSelection(); System.out.println(s); System.out.println(getRosterEntry()); diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShare.java index d992c76b4..52aa5f2c7 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShare.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShare.java @@ -45,17 +45,17 @@ public class ConsoleShare extends AbstractCollabShare { private static final Map consoleSharechannels = new Hashtable(); - private static TextSelection selection = null; - private static boolean initialized = false; + static TextSelection selection = null; + static boolean initialized = false; - private static final ISelectionListener selectionListener = new ISelectionListener() { - public void selectionChanged(IWorkbenchPart part, ISelection selection) { - if (part instanceof IConsoleView && selection instanceof TextSelection) { - TextSelection s = (TextSelection) selection; + static final ISelectionListener selectionListener = new ISelectionListener() { + public void selectionChanged(IWorkbenchPart part, ISelection sel) { + if (part instanceof IConsoleView && sel instanceof TextSelection) { + TextSelection s = (TextSelection) sel; if (s == null || s.getLength() == 0) ConsoleShare.selection = null; else - ConsoleShare.selection = (TextSelection) selection; + ConsoleShare.selection = (TextSelection) sel; } } }; @@ -110,27 +110,25 @@ public class ConsoleShare extends AbstractCollabShare { if (consoles.length == 0) { MessageDialog.openInformation(null, NLS.bind(Messages.ConsoleShare_STACK_TRACE_FROM_TITLE, user), NLS.bind(Messages.ConsoleShare_STACK_TRACE_FROM_MESSAGE, user)); return; - } else { - for (int i = 0; i < consoles.length; i++) { - final String consoleType = consoles[i].getType(); - if (consoleType != null && consoleType.equals("javaStackTraceConsole")) { //$NON-NLS-1$ - final TextConsole textConsole = (TextConsole) consoles[i]; - textConsole.activate(); - final IDocument document = textConsole.getDocument(); - final String text = document.get() + getConsoleSelectionToShow(user, consoleSelection); - document.set(text); - } + } + for (int i = 0; i < consoles.length; i++) { + final String consoleType = consoles[i].getType(); + if (consoleType != null && consoleType.equals("javaStackTraceConsole")) { //$NON-NLS-1$ + final TextConsole textConsole = (TextConsole) consoles[i]; + textConsole.activate(); + final IDocument document = textConsole.getDocument(); + final String text = document.get() + getConsoleSelectionToShow(user, consoleSelection); + document.set(text); } } } catch (final Exception e) { - showErrorToUser(Messages.ConsoleShare_STACKSHARE_ERROR_DIALOG_TITLE, NLS.bind(Messages.ConsoleShare_STACKSHARE_ERROR_DIALOG_MESSAGE, e.getLocalizedMessage())); logError(Messages.ConsoleShare_STACKSHARE_ERROR_LOG_MESSAGE, e); } } }); } - private String getConsoleSelectionToShow(String user, String stackTrace) { + String getConsoleSelectionToShow(String user, String stackTrace) { return NLS.bind(Messages.ConsoleShare_STACK_TRACE_CONTENT, user, stackTrace); } @@ -140,10 +138,8 @@ public class ConsoleShare extends AbstractCollabShare { try { sendMessage(toID, serialize(new Object[] {senderuser, consoleSelection})); } catch (final ECFException e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getStatus().getException().getLocalizedMessage())); logError(e.getStatus()); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_SEND, e); } } @@ -160,7 +156,6 @@ public class ConsoleShare extends AbstractCollabShare { final Object[] msg = (Object[]) deserialize(data); handleShowConsoleSelection((String) msg[0], (String) msg[1]); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_RECEIVE_TITLE, NLS.bind(Messages.Share_ERROR_RECEIVE_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_MESSAGE, e); } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShareRosterEntryContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShareRosterEntryContributionItem.java index fd82826f2..78f785817 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShareRosterEntryContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/console/ConsoleShareRosterEntryContributionItem.java @@ -19,10 +19,12 @@ import org.eclipse.ecf.presence.ui.roster.AbstractRosterEntryContributionItem; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; import org.eclipse.jface.text.TextSelection; +import org.eclipse.ui.plugin.AbstractUIPlugin; public class ConsoleShareRosterEntryContributionItem extends AbstractRosterEntryContributionItem { public ConsoleShareRosterEntryContributionItem() { + // do nothing } public ConsoleShareRosterEntryContributionItem(String id) { @@ -51,7 +53,7 @@ public class ConsoleShareRosterEntryContributionItem extends AbstractRosterEntry } }; action.setText(Messages.ConsoleShare_RosterEntryMenu); - action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.ConsoleShare_RosterContributionItem_CONSOLE_ICON)); + action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.ConsoleShare_RosterContributionItem_CONSOLE_ICON)); return new IAction[] {action}; } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureDataMessage.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureDataMessage.java new file mode 100644 index 000000000..70e4e925c --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureDataMessage.java @@ -0,0 +1,55 @@ +/**************************************************************************** + * 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.presence.collab.ui.screencapture; + +import java.io.Serializable; + +import org.eclipse.ecf.core.identity.ID; + +/** + * + */ +public class ScreenCaptureDataMessage implements Serializable { + + private static final long serialVersionUID = 6036044167371073951L; + ID senderID; + byte[] data; + Boolean isDone; + + public ScreenCaptureDataMessage(ID senderID, byte[] data, Boolean isDone) { + this.senderID = senderID; + this.data = data; + this.isDone = isDone; + } + + /** + * @return the senderID + */ + public ID getSenderID() { + return senderID; + } + + /** + * @return the data + */ + public byte[] getData() { + return data; + } + + /** + * @return the isDone + */ + public Boolean getIsDone() { + return isDone; + } + +} diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShare.java new file mode 100644 index 000000000..0ffacc017 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShare.java @@ -0,0 +1,124 @@ +/**************************************************************************** + * Copyright (c) 2004 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.presence.collab.ui.screencapture; + +import java.io.ByteArrayOutputStream; +import java.util.Hashtable; +import java.util.Map; + +import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.core.util.ECFException; +import org.eclipse.ecf.datashare.IChannelContainerAdapter; +import org.eclipse.ecf.internal.presence.collab.ui.Messages; +import org.eclipse.ecf.presence.collab.ui.AbstractCollabShare; +import org.eclipse.ecf.ui.screencapture.ImageWrapper; +import org.eclipse.ecf.ui.screencapture.ScreenCaptureUtil; +import org.eclipse.ecf.ui.screencapture.ShowImageShell; +import org.eclipse.osgi.util.NLS; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.graphics.ImageData; +import org.eclipse.swt.widgets.Display; + +/** + * Send/receive requests to share a specific view (identified by view ID). + */ +public class ScreenCaptureShare extends AbstractCollabShare { + + private static final int MAX_MESSAGE_SIZE = 8096; + + private static final Map screenCaptureSharechannels = new Hashtable(); + + public static ScreenCaptureShare getScreenCaptureShare(ID containerID) { + return (ScreenCaptureShare) screenCaptureSharechannels.get(containerID); + } + + public static ScreenCaptureShare addScreenCaptureShare(ID containerID, IChannelContainerAdapter channelAdapter) throws ECFException { + return (ScreenCaptureShare) screenCaptureSharechannels.put(containerID, new ScreenCaptureShare(channelAdapter)); + } + + public static ScreenCaptureShare removeScreenCaptureShare(ID containerID) { + return (ScreenCaptureShare) screenCaptureSharechannels.remove(containerID); + } + + public ScreenCaptureShare(IChannelContainerAdapter adapter) throws ECFException { + super(adapter); + } + + ShowImageShell showImageShell = null; + + protected void handleScreenCaptureStart(final ID id, final String fromUser, final ImageWrapper imageWrapper) { + Display.getDefault().asyncExec(new Runnable() { + public void run() { + if (showImageShell == null) { + showImageShell = new ShowImageShell(Display.getDefault(), id, imageWrapper, new DisposeListener() { + public void widgetDisposed(DisposeEvent e) { + showImageShell = null; + } + }); + showImageShell.setText(NLS.bind(Messages.ScreenCaptureShare_SCREEN_CAPTURE_RECEIVE_TITLE, fromUser)); + showImageShell.open(); + } + } + }); + } + + protected void handleScreenCaptureData(final ID id, final byte[] data, final Boolean done) { + Display.getDefault().asyncExec(new Runnable() { + public void run() { + if (showImageShell != null && showImageShell.getSenderID().equals(id)) { + showImageShell.addData(data); + if (done.booleanValue()) + showImageShell.showImage(); + } + } + }); + } + + public void sendImage(final ID senderID, final String senderuser, final ID toID, ImageData imageData) { + try { + sendMessage(toID, serialize(new ScreenCaptureStartMessage(senderID, senderuser, new ImageWrapper(imageData)))); + final byte[] compressedData = ScreenCaptureUtil.compress(imageData.data); + final ByteArrayOutputStream bos = new ByteArrayOutputStream(MAX_MESSAGE_SIZE); + int startPos = 0; + while (startPos <= compressedData.length) { + bos.reset(); + final int length = Math.min(compressedData.length - startPos, MAX_MESSAGE_SIZE); + bos.write(compressedData, startPos, length); + startPos += MAX_MESSAGE_SIZE; + bos.flush(); + sendMessage(toID, serialize(new ScreenCaptureDataMessage(senderID, bos.toByteArray(), new Boolean((compressedData.length - startPos) <= 0)))); + } + } catch (final Exception e) { + logError(Messages.Share_EXCEPTION_LOG_SEND, e); + } + } + + /* + * (non-Javadoc) + * + * @see org.eclipse.ecf.datashare.AbstractShare#handleChannelData(byte[]) + */ + protected void handleMessage(ID fromContainerID, byte[] data) { + try { + final Object msg = deserialize(data); + if (msg instanceof ScreenCaptureStartMessage) { + handleScreenCaptureStart(((ScreenCaptureStartMessage) msg).getSenderID(), ((ScreenCaptureStartMessage) msg).getSenderUser(), ((ScreenCaptureStartMessage) msg).getImageWrapper()); + } else if (msg instanceof ScreenCaptureDataMessage) { + handleScreenCaptureData(((ScreenCaptureDataMessage) msg).getSenderID(), ((ScreenCaptureDataMessage) msg).getData(), ((ScreenCaptureDataMessage) msg).getIsDone()); + } + } catch (final Exception e) { + logError(Messages.Share_EXCEPTION_LOG_MESSAGE, e); + } + } + +} diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterContributionItem.java new file mode 100644 index 000000000..5eac2aabe --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterContributionItem.java @@ -0,0 +1,80 @@ +/**************************************************************************** + * 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.presence.collab.ui.screencapture; + +import org.eclipse.ecf.core.IContainer; +import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.core.util.ECFException; +import org.eclipse.ecf.datashare.IChannelContainerAdapter; +import org.eclipse.ecf.internal.presence.collab.ui.Messages; +import org.eclipse.ecf.presence.roster.IRoster; +import org.eclipse.ecf.presence.ui.roster.AbstractRosterContributionItem; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.PlatformUI; + +public class ScreenCaptureShareRosterContributionItem extends AbstractRosterContributionItem { + + public ScreenCaptureShareRosterContributionItem() { + // nothing + } + + public ScreenCaptureShareRosterContributionItem(String id) { + super(id); + } + + private IAction[] createActionAdd(final ID containerID, final IChannelContainerAdapter channelAdapter) { + final IAction action = new Action() { + public void run() { + try { + ScreenCaptureShare.addScreenCaptureShare(containerID, channelAdapter); + } catch (ECFException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + }; + action.setText(Messages.ViewShareRosterContributionItem_VIEWSHARE_LISTENER_MENU_ADD_TEXT); + action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_DEF_VIEW)); + return new IAction[] {action}; + } + + private IAction[] createActionRemove(final ID containerID, final ScreenCaptureShare screenCaptureShare) { + final IAction action = new Action() { + public void run() { + ScreenCaptureShare.removeScreenCaptureShare(containerID); + screenCaptureShare.dispose(); + } + }; + action.setText(Messages.ViewShareRosterContributionItem_VIEWSHARE_LISTENER_MENU_REMOVE_TEXT); + return new IAction[] {action}; + } + + protected IAction[] makeActions() { + final IRoster roster = getSelectedRoster(); + if (roster != null) { + // Roster is selected + final IContainer c = getContainerForRoster(roster); + if (c != null) { + // Get existing ScreenCaptureShare for this container (if it exists) + final ScreenCaptureShare screenCaptureShare = ScreenCaptureShare.getScreenCaptureShare(c.getID()); + // If it does exist already, then create action to remove + if (screenCaptureShare != null) + return createActionRemove(c.getID(), screenCaptureShare); + final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); + return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter); + } + } + return null; + } + +} diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterEntryContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterEntryContributionItem.java new file mode 100644 index 000000000..7ae5402dc --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureShareRosterEntryContributionItem.java @@ -0,0 +1,75 @@ +/**************************************************************************** + * 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.presence.collab.ui.screencapture; + +import org.eclipse.ecf.core.IContainer; +import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.datashare.IChannelContainerAdapter; +import org.eclipse.ecf.internal.presence.collab.ui.Messages; +import org.eclipse.ecf.presence.roster.IRosterEntry; +import org.eclipse.ecf.presence.ui.roster.AbstractRosterEntryContributionItem; +import org.eclipse.ecf.ui.screencapture.IImageSender; +import org.eclipse.ecf.ui.screencapture.ScreenCaptureJob; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.graphics.ImageData; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.PlatformUI; + +public class ScreenCaptureShareRosterEntryContributionItem extends AbstractRosterEntryContributionItem { + + public static final long SCREEN_CAPTURE_DELAY = 5000; + + public ScreenCaptureShareRosterEntryContributionItem() { + // nothing + } + + public ScreenCaptureShareRosterEntryContributionItem(String id) { + super(id); + } + + protected IAction[] makeActions() { + // Else check for Roster entry + final IRosterEntry entry = getSelectedRosterEntry(); + final IContainer c = getContainerForRosterEntry(entry); + // If roster entry is selected and it has a container + if (entry != null && c != null) { + final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); + // If the container has channel container adapter and is online/available + if (channelAdapter != null && isAvailable(entry)) { + final ScreenCaptureShare tmp = ScreenCaptureShare.getScreenCaptureShare(c.getID()); + // If there is an URL share associated with this container + if (tmp != null) { + final ScreenCaptureShare screencaptureshare = tmp; + final IAction action = new Action() { + public void run() { + if (MessageDialog.openQuestion(null, Messages.ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_TITLE, Messages.ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MESSAGEBOX_MESSAGE)) { + ScreenCaptureJob screenCaptureJob = new ScreenCaptureJob(Display.getCurrent(), entry.getUser().getID(), new IImageSender() { + public void sendImage(ID targetID, ImageData imageData) { + screencaptureshare.sendImage(entry.getRoster().getUser().getID(), entry.getRoster().getUser().getName(), targetID, imageData); + } + }); + screenCaptureJob.schedule(SCREEN_CAPTURE_DELAY); + } + } + }; + action.setText(Messages.ScreenCaptureShareRosterEntryContributionItem_SCREEN_CAPTURE_MENU); + action.setImageDescriptor(PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_DEF_VIEW)); + return new IAction[] {action}; + } + } + } + return null; + } + +} diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureStartMessage.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureStartMessage.java new file mode 100644 index 000000000..e568c97e1 --- /dev/null +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/screencapture/ScreenCaptureStartMessage.java @@ -0,0 +1,47 @@ +/**************************************************************************** + * 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.presence.collab.ui.screencapture; + +import java.io.Serializable; + +import org.eclipse.ecf.core.identity.ID; +import org.eclipse.ecf.ui.screencapture.ImageWrapper; + +/** + * + */ +public class ScreenCaptureStartMessage implements Serializable { + + private static final long serialVersionUID = 8305404092939645129L; + + ID senderID; + String senderUser; + ImageWrapper imageWrapper; + + public ScreenCaptureStartMessage(ID senderID, String senderUser, ImageWrapper imageWrapper) { + this.senderID = senderID; + this.senderUser = senderUser; + this.imageWrapper = imageWrapper; + } + + public ID getSenderID() { + return senderID; + } + + public String getSenderUser() { + return senderUser; + } + + public ImageWrapper getImageWrapper() { + return imageWrapper; + } +} diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLRosterViewerDropTarget.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLRosterViewerDropTarget.java index e35534195..784516ad2 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLRosterViewerDropTarget.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLRosterViewerDropTarget.java @@ -31,8 +31,8 @@ public class URLRosterViewerDropTarget implements IRosterViewerDropTarget { return true; } - private URLShare getURLShare(IRosterEntry rosterEntry) { - final IPresenceContainerAdapter pca = rosterEntry.getRoster().getPresenceContainerAdapter(); + private URLShare getURLShare(IRosterEntry rosterEntry1) { + final IPresenceContainerAdapter pca = rosterEntry1.getRoster().getPresenceContainerAdapter(); if (pca == null) return null; final IContainer container = (IContainer) pca.getAdapter(IContainer.class); diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java index a890decc5..a2292331f 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShare.java @@ -21,6 +21,7 @@ import org.eclipse.ecf.internal.presence.collab.ui.Messages; import org.eclipse.ecf.presence.collab.ui.AbstractCollabShare; import org.eclipse.jface.dialogs.InputDialog; import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.window.Window; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.PlatformUI; @@ -61,7 +62,6 @@ public class URLShare extends AbstractCollabShare { browser = support.createBrowser(null); browser.openURL(new URL(url)); } catch (final Exception e) { - showErrorToUser(Messages.URLShare_ERROR_BROWSER_TITLE, NLS.bind(Messages.URLShare_ERROR_BROWSER_MESSAGE, e.getLocalizedMessage())); logError(Messages.URLShare_EXCEPTION_LOG_BROWSER, e); } } @@ -73,10 +73,8 @@ public class URLShare extends AbstractCollabShare { try { sendMessage(toID, serialize(new Object[] {senderuser, theURL})); } catch (final ECFException e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getStatus().getException().getLocalizedMessage())); logError(e.getStatus()); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_SEND, e); } } @@ -87,16 +85,14 @@ public class URLShare extends AbstractCollabShare { final InputDialog input = new InputDialog(null, Messages.URLShare_INPUT_URL_DIALOG_TITLE, Messages.URLShare_ENTER_URL_DIALOG_TEXT, Messages.URLShare_ENTER_URL_DEFAULT_URL, null); input.setBlockOnOpen(true); final int result = input.open(); - if (result == InputDialog.OK) { + if (result == Window.OK) { final String send = input.getValue(); if (send != null && !send.equals("")) { //$NON-NLS-1$ try { sendMessage(toID, serialize(new Object[] {senderuser, send})); } catch (final ECFException e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getStatus().getException().getLocalizedMessage())); logError(e.getStatus()); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_SEND, e); } } @@ -115,7 +111,6 @@ public class URLShare extends AbstractCollabShare { final Object[] msg = (Object[]) deserialize(data); showURL((String) msg[0], (String) msg[1]); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_RECEIVE_TITLE, NLS.bind(Messages.Share_ERROR_RECEIVE_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_MESSAGE, e); } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterContributionItem.java index c5527550f..e6a4899ff 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterContributionItem.java @@ -20,10 +20,12 @@ import org.eclipse.ecf.presence.roster.IRoster; import org.eclipse.ecf.presence.ui.roster.AbstractRosterContributionItem; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; +import org.eclipse.ui.plugin.AbstractUIPlugin; public class URLShareRosterContributionItem extends AbstractRosterContributionItem { public URLShareRosterContributionItem() { + // do nothing } public URLShareRosterContributionItem(String id) { @@ -42,7 +44,7 @@ public class URLShareRosterContributionItem extends AbstractRosterContributionIt } }; action.setText(Messages.URLShareRosterContributionItem_ADD_URL_SHARE_MENU_TEXT); - action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); + action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); return new IAction[] {action}; } @@ -54,7 +56,7 @@ public class URLShareRosterContributionItem extends AbstractRosterContributionIt } }; action.setText(Messages.URLShareRosterContributionItem_REMOVE_URL_SHARE_MENU_TEXT); - action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); + action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); return new IAction[] {action}; } @@ -69,10 +71,8 @@ public class URLShareRosterContributionItem extends AbstractRosterContributionIt // If it does exist already, then create action to remove if (urlshare != null) return createActionRemove(c.getID(), urlshare); - else { - final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); - return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter); - } + final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); + return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter); } } return null; diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterEntryContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterEntryContributionItem.java index 4ea4d10e3..2e286b820 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterEntryContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/url/URLShareRosterEntryContributionItem.java @@ -18,10 +18,12 @@ import org.eclipse.ecf.presence.roster.IRosterEntry; import org.eclipse.ecf.presence.ui.roster.AbstractRosterEntryContributionItem; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; +import org.eclipse.ui.plugin.AbstractUIPlugin; public class URLShareRosterEntryContributionItem extends AbstractRosterEntryContributionItem { public URLShareRosterEntryContributionItem() { + // do nothing } public URLShareRosterEntryContributionItem(String id) { @@ -47,7 +49,7 @@ public class URLShareRosterEntryContributionItem extends AbstractRosterEntryCont } }; action.setText(Messages.URLShareRosterEntryContributionItem_SEND_URL_MENU_TEXT); - action.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); + action.setImageDescriptor(AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, Messages.URLShareRosterContributionItem_BROWSER_ICON)); return new IAction[] {action}; } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShare.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShare.java index 9cb13df22..7e9b833e3 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShare.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShare.java @@ -76,7 +76,6 @@ public class ViewShare extends AbstractCollabShare { wp.showView(viewID, secondaryID, mode); } catch (final Exception e) { - showErrorToUser(Messages.ViewShare_VIEWSHARE_ERROR_DIALOG_TITLE, NLS.bind(Messages.ViewShare_VIEWSHARE_ERROR_DIALOG_MESSAGE, e.getLocalizedMessage())); logError(Messages.ViewShare_VIEWSHARE_ERROR_LOG_MESSAGE, e); } } @@ -100,9 +99,9 @@ public class ViewShare extends AbstractCollabShare { public IStatus validate(Object[] selection) { for (int i = 0; i < selection.length; ++i) if (!(selection[i] instanceof IViewDescriptor)) - return new Status(Status.ERROR, Activator.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ + return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, "", null); //$NON-NLS-1$ - return new Status(Status.OK, Activator.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$ + return new Status(IStatus.OK, Activator.getDefault().getBundle().getSymbolicName(), 0, "", null); //$NON-NLS-1$ } }); final IViewRegistry reg = PlatformUI.getWorkbench().getViewRegistry(); @@ -123,10 +122,8 @@ public class ViewShare extends AbstractCollabShare { // with selectedIDs (view IDs) to show sendMessage(toID, serialize(new Object[] {senderuser, selectedIDs[i]})); } catch (final ECFException e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getStatus().getException().getLocalizedMessage())); logError(e.getStatus()); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_SEND_TITLE, NLS.bind(Messages.Share_ERROR_SEND_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_SEND, e); } } @@ -144,7 +141,6 @@ public class ViewShare extends AbstractCollabShare { final Object[] msg = (Object[]) deserialize(data); handleOpenViewRequest((String) msg[0], (String) msg[1], null, IWorkbenchPage.VIEW_ACTIVATE); } catch (final Exception e) { - showErrorToUser(Messages.Share_ERROR_RECEIVE_TITLE, NLS.bind(Messages.Share_ERROR_RECEIVE_MESSAGE, e.getLocalizedMessage())); logError(Messages.Share_EXCEPTION_LOG_MESSAGE, e); } } diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterContributionItem.java index c5d3e9c60..9ab62b613 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterContributionItem.java @@ -25,6 +25,7 @@ import org.eclipse.ui.PlatformUI; public class ViewShareRosterContributionItem extends AbstractRosterContributionItem { public ViewShareRosterContributionItem() { + // nothing } public ViewShareRosterContributionItem(String id) { @@ -69,10 +70,8 @@ public class ViewShareRosterContributionItem extends AbstractRosterContributionI // If it does exist already, then create action to remove if (viewShare != null) return createActionRemove(c.getID(), viewShare); - else { - final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); - return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter); - } + final IChannelContainerAdapter channelAdapter = (IChannelContainerAdapter) c.getAdapter(IChannelContainerAdapter.class); + return (channelAdapter == null) ? null : createActionAdd(c.getID(), channelAdapter); } } return null; diff --git a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterEntryContributionItem.java b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterEntryContributionItem.java index 2ff14e704..1863c1b1c 100644 --- a/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterEntryContributionItem.java +++ b/framework/bundles/org.eclipse.ecf.presence.collab.ui/src/org/eclipse/ecf/presence/collab/ui/view/ViewShareRosterEntryContributionItem.java @@ -23,6 +23,7 @@ import org.eclipse.ui.PlatformUI; public class ViewShareRosterEntryContributionItem extends AbstractRosterEntryContributionItem { public ViewShareRosterEntryContributionItem() { + // do nothing } public ViewShareRosterEntryContributionItem(String id) { |