Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2010-06-18 21:20:17 +0000
committerMatthias Sohn2010-06-18 21:38:00 +0000
commitc3913dc05355986ab5ec44bc12f1180286bcfd38 (patch)
tree4d938f420e1d6403c9237dddcf76adec5613b4b8 /org.eclipse.egit.core
parent4fec29460f0cd3d3a507fc5118815d991afd44cb (diff)
downloadegit-c3913dc05355986ab5ec44bc12f1180286bcfd38.tar.gz
egit-c3913dc05355986ab5ec44bc12f1180286bcfd38.tar.xz
egit-c3913dc05355986ab5ec44bc12f1180286bcfd38.zip
Fix line endings
Some sources had dos line endings. Also configure all projects to use unix line endings and UTF-8 encoding. Change-Id: I119cad245f0f5ecd20ee1450877cb7e1a5d63783 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.core')
-rw-r--r--org.eclipse.egit.core/.settings/org.eclipse.core.runtime.prefs6
-rw-r--r--org.eclipse.egit.core/.settings/org.eclipse.jdt.core.prefs696
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/GitTraceLocation.java272
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/ITraceLocation.java62
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBaseResourceVariantTree.java76
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBlobResourceVariant.java244
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitFolderResourceVariant.java118
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteResourceVariantTree.java76
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java20
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantComparator.java326
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java850
11 files changed, 1373 insertions, 1373 deletions
diff --git a/org.eclipse.egit.core/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit.core/.settings/org.eclipse.core.runtime.prefs
index b6db226b2c..dfc3779a15 100644
--- a/org.eclipse.egit.core/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit.core/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:54:53 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:54:53 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egit.core/.settings/org.eclipse.jdt.core.prefs
index d30cb5f095..f34582e984 100644
--- a/org.eclipse.egit.core/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.egit.core/.settings/org.eclipse.jdt.core.prefs
@@ -1,348 +1,348 @@
-#Wed May 05 01:32:35 CEST 2010
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
-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.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=warning
-org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
-org.eclipse.jdt.core.compiler.problem.deadCode=warning
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=error
-org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
-org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
-org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
-org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
-org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
-org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
-org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
-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=private
-org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
-org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
-org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
-org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
-org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
-org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
-org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
-org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.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=error
-org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
-org.eclipse.jdt.core.compiler.problem.unusedLabel=error
-org.eclipse.jdt.core.compiler.problem.unusedLocal=error
-org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
-org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
-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=error
-org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
-org.eclipse.jdt.core.compiler.source=1.5
-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=1
-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=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
-org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
-org.eclipse.jdt.core.formatter.comment.format_block_comments=true
-org.eclipse.jdt.core.formatter.comment.format_comments=true
-org.eclipse.jdt.core.formatter.comment.format_header=false
-org.eclipse.jdt.core.formatter.comment.format_html=true
-org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
-org.eclipse.jdt.core.formatter.comment.format_line_comments=true
-org.eclipse.jdt.core.formatter.comment.format_source_code=true
-org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
-org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
-org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
-org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
-org.eclipse.jdt.core.formatter.comment.line_length=80
-org.eclipse.jdt.core.formatter.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=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_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=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=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
-org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_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=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+#Wed May 05 01:32:35 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+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.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=warning
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=error
+org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=warning
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=warning
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error
+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=private
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=warning
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=warning
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=ignore
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.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=error
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedLabel=error
+org.eclipse.jdt.core.compiler.problem.unusedLocal=error
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=warning
+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=error
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
+org.eclipse.jdt.core.compiler.source=1.5
+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=1
+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=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.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=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_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=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=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_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=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/GitTraceLocation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/GitTraceLocation.java
index 382283f44d..a5ce9db447 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/GitTraceLocation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/GitTraceLocation.java
@@ -1,136 +1,136 @@
-/*******************************************************************************
- * Copyright (c) 2010 SAP AG.
- * 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:
- * Mathias Kinzler (SAP AG) - initial implementation
- *******************************************************************************/
-package org.eclipse.egit.core.internal.trace;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.egit.core.Activator;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * EGit Trace locations
- *
- */
-public enum GitTraceLocation implements ITraceLocation {
- /** Core */
- CORE("/debug/core"); //$NON-NLS-1$
-
- /**
- * Initialize the locations
- *
- * @param options
- * @param pluginIsDebugging
- */
- public static void initializeFromOptions(DebugOptions options,
- boolean pluginIsDebugging) {
-
- // we evaluate the plug-in switch
- if (pluginIsDebugging) {
- myTrace = new DebugTraceImpl();
- for (GitTraceLocation loc : values()) {
- boolean active = options.getBooleanOption(loc.getFullPath(),
- false);
- loc.setActive(active);
- }
- } else {
- // if the plug-in switch is off, we don't set the trace instance
- // to null to avoid problems with possibly running trace calls
- for (GitTraceLocation loc : values()) {
- loc.setActive(false);
- }
- }
- }
-
- private final String location;
-
- private final String fullPath;
-
- private boolean active = false;
-
- private static DebugTrace myTrace;
-
- private GitTraceLocation(String path) {
- this.fullPath = Activator.getPluginId() + path;
- this.location = path;
- }
-
- /**
- * Convenience method
- *
- * @return the debug trace (may be null)
- *
- **/
- public static DebugTrace getTrace() {
- return GitTraceLocation.myTrace;
- }
-
- /**
- *
- * @return <code>true</code> if this location is active
- */
- public boolean isActive() {
- return this.active;
- }
-
- /**
- * @return the full path
- */
- public String getFullPath() {
- return this.fullPath;
- }
-
- public String getLocation() {
- return this.location;
- }
-
- /**
- * Sets the "active" flag for this location.
- * <p>
- * Used by the initializer
- *
- * @param active
- * the "active" flag
- */
- private void setActive(boolean active) {
- this.active = active;
- }
-
- private static final class DebugTraceImpl implements DebugTrace {
-
- private ILog myLog;
-
- public void trace(String location, String message) {
- getLog().log(
- new Status(IStatus.INFO, Activator.getPluginId(), message));
-
- }
-
- public void trace(String location, String message, Throwable error) {
-
- getLog().log(
- new Status(IStatus.INFO, Activator.getPluginId(), message));
- if (error != null)
- getLog().log(
- new Status(IStatus.INFO, Activator.getPluginId(), error
- .getMessage()));
-
- }
-
- private ILog getLog() {
- if (myLog == null) {
- myLog = Activator.getDefault().getLog();
- }
- return myLog;
- }
-
- }
-}
+/*******************************************************************************
+ * Copyright (c) 2010 SAP AG.
+ * 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:
+ * Mathias Kinzler (SAP AG) - initial implementation
+ *******************************************************************************/
+package org.eclipse.egit.core.internal.trace;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egit.core.Activator;
+import org.eclipse.osgi.service.debug.DebugOptions;
+
+/**
+ * EGit Trace locations
+ *
+ */
+public enum GitTraceLocation implements ITraceLocation {
+ /** Core */
+ CORE("/debug/core"); //$NON-NLS-1$
+
+ /**
+ * Initialize the locations
+ *
+ * @param options
+ * @param pluginIsDebugging
+ */
+ public static void initializeFromOptions(DebugOptions options,
+ boolean pluginIsDebugging) {
+
+ // we evaluate the plug-in switch
+ if (pluginIsDebugging) {
+ myTrace = new DebugTraceImpl();
+ for (GitTraceLocation loc : values()) {
+ boolean active = options.getBooleanOption(loc.getFullPath(),
+ false);
+ loc.setActive(active);
+ }
+ } else {
+ // if the plug-in switch is off, we don't set the trace instance
+ // to null to avoid problems with possibly running trace calls
+ for (GitTraceLocation loc : values()) {
+ loc.setActive(false);
+ }
+ }
+ }
+
+ private final String location;
+
+ private final String fullPath;
+
+ private boolean active = false;
+
+ private static DebugTrace myTrace;
+
+ private GitTraceLocation(String path) {
+ this.fullPath = Activator.getPluginId() + path;
+ this.location = path;
+ }
+
+ /**
+ * Convenience method
+ *
+ * @return the debug trace (may be null)
+ *
+ **/
+ public static DebugTrace getTrace() {
+ return GitTraceLocation.myTrace;
+ }
+
+ /**
+ *
+ * @return <code>true</code> if this location is active
+ */
+ public boolean isActive() {
+ return this.active;
+ }
+
+ /**
+ * @return the full path
+ */
+ public String getFullPath() {
+ return this.fullPath;
+ }
+
+ public String getLocation() {
+ return this.location;
+ }
+
+ /**
+ * Sets the "active" flag for this location.
+ * <p>
+ * Used by the initializer
+ *
+ * @param active
+ * the "active" flag
+ */
+ private void setActive(boolean active) {
+ this.active = active;
+ }
+
+ private static final class DebugTraceImpl implements DebugTrace {
+
+ private ILog myLog;
+
+ public void trace(String location, String message) {
+ getLog().log(
+ new Status(IStatus.INFO, Activator.getPluginId(), message));
+
+ }
+
+ public void trace(String location, String message, Throwable error) {
+
+ getLog().log(
+ new Status(IStatus.INFO, Activator.getPluginId(), message));
+ if (error != null)
+ getLog().log(
+ new Status(IStatus.INFO, Activator.getPluginId(), error
+ .getMessage()));
+
+ }
+
+ private ILog getLog() {
+ if (myLog == null) {
+ myLog = Activator.getDefault().getLog();
+ }
+ return myLog;
+ }
+
+ }
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/ITraceLocation.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/ITraceLocation.java
index 5465111206..23f191f2ae 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/ITraceLocation.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/internal/trace/ITraceLocation.java
@@ -1,31 +1,31 @@
-/*******************************************************************************
- * Copyright (c) 2010 SAP AG.
- * 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:
- * Mathias Kinzler (SAP AG) - initial implementation
- *******************************************************************************/
-package org.eclipse.egit.core.internal.trace;
-
-/**
- * Helper interface for trace location management
- * <p>
- * Additional methods could return a description or such...
- *
- */
-public interface ITraceLocation {
-
- /**
- * @return the location, e.g. "/debug/mainArea/subArea"
- */
- public String getLocation();
-
- /**
- * @return <code>true</code> if the location is active
- */
- public boolean isActive();
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 SAP AG.
+ * 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:
+ * Mathias Kinzler (SAP AG) - initial implementation
+ *******************************************************************************/
+package org.eclipse.egit.core.internal.trace;
+
+/**
+ * Helper interface for trace location management
+ * <p>
+ * Additional methods could return a description or such...
+ *
+ */
+public interface ITraceLocation {
+
+ /**
+ * @return the location, e.g. "/debug/mainArea/subArea"
+ */
+ public String getLocation();
+
+ /**
+ * @return <code>true</code> if the location is active
+ */
+ public boolean isActive();
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBaseResourceVariantTree.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBaseResourceVariantTree.java
index 3c5c4e037f..9ef41da54e 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBaseResourceVariantTree.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBaseResourceVariantTree.java
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Dariusz Luksza <dariusz@luksza.org>
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
-import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.Tree;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-
-class GitBaseResourceVariantTree extends GitResourceVariantTree {
-
- GitBaseResourceVariantTree(GitSynchronizeDataSet data, ResourceVariantByteStore store) {
- super(data, store);
- }
-
- @Override
- Tree getRevTree(IResource resource) throws IOException {
- return getSyncData().getData(resource.getProject()).mapSrcTree();
- }
-
- @Override
- ObjectId getRevObjId(IResource resource) throws IOException {
- return getSyncData().getData(resource.getProject()).getSrcObjectId();
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Dariusz Luksza <dariusz@luksza.org>
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Tree;
+import org.eclipse.team.core.variants.ResourceVariantByteStore;
+
+class GitBaseResourceVariantTree extends GitResourceVariantTree {
+
+ GitBaseResourceVariantTree(GitSynchronizeDataSet data, ResourceVariantByteStore store) {
+ super(data, store);
+ }
+
+ @Override
+ Tree getRevTree(IResource resource) throws IOException {
+ return getSyncData().getData(resource.getProject()).mapSrcTree();
+ }
+
+ @Override
+ ObjectId getRevObjId(IResource resource) throws IOException {
+ return getSyncData().getData(resource.getProject()).getSrcObjectId();
+ }
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBlobResourceVariant.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBlobResourceVariant.java
index 47e5e4c935..8f78cdaaf7 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBlobResourceVariant.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitBlobResourceVariant.java
@@ -1,122 +1,122 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.resources.IEncodedStorage;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.content.IContentDescription;
-import org.eclipse.core.runtime.content.IContentTypeManager;
-import org.eclipse.egit.core.Activator;
-import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.ObjectLoader;
-import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.revwalk.RevCommitList;
-import org.eclipse.team.core.TeamException;
-
-/**
- * This is a representation of a file's blob in some branch.
- */
-class GitBlobResourceVariant extends GitResourceVariant {
-
- private ObjectId id;
-
- private Repository repository;
-
- private IStorage storage;
-
- private RevCommitList<RevCommit> commitList;
-
- GitBlobResourceVariant(IResource resource, Repository repository,
- ObjectId id, RevCommitList<RevCommit> commitList) {
- super(resource);
- this.repository = repository;
- this.id = id;
- this.commitList = commitList;
- }
-
- ObjectId getId() {
- return id;
- }
-
- RevCommitList<RevCommit> getCommitList() {
- return commitList;
- }
-
- public boolean isContainer() {
- return false;
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- if (storage == null) {
- try {
- ObjectLoader ol = repository.openBlob(id);
- final byte[] bytes = ol.getBytes();
- storage = new IEncodedStorage() {
- public Object getAdapter(Class adapter) {
- return null;
- }
-
- public boolean isReadOnly() {
- return true;
- }
-
- public String getName() {
- return GitBlobResourceVariant.this.getName();
- }
-
- public IPath getFullPath() {
- return null;
- }
-
- public InputStream getContents() throws CoreException {
- return new ByteArrayInputStream(bytes);
- }
-
- public String getCharset() throws CoreException {
- IContentTypeManager manager = Platform
- .getContentTypeManager();
- try {
- IContentDescription description = manager
- .getDescriptionFor(getContents(),
- getName(), IContentDescription.ALL);
- return description == null ? null : description
- .getCharset();
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR,
- Activator.getPluginId(), e.getMessage(), e));
- }
- }
- };
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, Activator
- .getPluginId(), e.getMessage(), e));
- }
- }
- return storage;
- }
-
- public String getContentIdentifier() {
- return id.name();
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.eclipse.core.resources.IEncodedStorage;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.egit.core.Activator;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevCommitList;
+import org.eclipse.team.core.TeamException;
+
+/**
+ * This is a representation of a file's blob in some branch.
+ */
+class GitBlobResourceVariant extends GitResourceVariant {
+
+ private ObjectId id;
+
+ private Repository repository;
+
+ private IStorage storage;
+
+ private RevCommitList<RevCommit> commitList;
+
+ GitBlobResourceVariant(IResource resource, Repository repository,
+ ObjectId id, RevCommitList<RevCommit> commitList) {
+ super(resource);
+ this.repository = repository;
+ this.id = id;
+ this.commitList = commitList;
+ }
+
+ ObjectId getId() {
+ return id;
+ }
+
+ RevCommitList<RevCommit> getCommitList() {
+ return commitList;
+ }
+
+ public boolean isContainer() {
+ return false;
+ }
+
+ public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
+ if (storage == null) {
+ try {
+ ObjectLoader ol = repository.openBlob(id);
+ final byte[] bytes = ol.getBytes();
+ storage = new IEncodedStorage() {
+ public Object getAdapter(Class adapter) {
+ return null;
+ }
+
+ public boolean isReadOnly() {
+ return true;
+ }
+
+ public String getName() {
+ return GitBlobResourceVariant.this.getName();
+ }
+
+ public IPath getFullPath() {
+ return null;
+ }
+
+ public InputStream getContents() throws CoreException {
+ return new ByteArrayInputStream(bytes);
+ }
+
+ public String getCharset() throws CoreException {
+ IContentTypeManager manager = Platform
+ .getContentTypeManager();
+ try {
+ IContentDescription description = manager
+ .getDescriptionFor(getContents(),
+ getName(), IContentDescription.ALL);
+ return description == null ? null : description
+ .getCharset();
+ } catch (IOException e) {
+ throw new CoreException(new Status(IStatus.ERROR,
+ Activator.getPluginId(), e.getMessage(), e));
+ }
+ }
+ };
+ } catch (IOException e) {
+ throw new TeamException(new Status(IStatus.ERROR, Activator
+ .getPluginId(), e.getMessage(), e));
+ }
+ }
+ return storage;
+ }
+
+ public String getContentIdentifier() {
+ return id.name();
+ }
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitFolderResourceVariant.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitFolderResourceVariant.java
index 75182d5282..682db175fa 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitFolderResourceVariant.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitFolderResourceVariant.java
@@ -1,59 +1,59 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IStorage;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.team.core.TeamException;
-
-class GitFolderResourceVariant extends GitResourceVariant {
-
- GitFolderResourceVariant(IResource resource) {
- super(resource);
- }
-
- IContainer getContainer() {
- return (IContainer) getResource();
- }
-
- public boolean isContainer() {
- return true;
- }
-
- public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
- return null;
- }
-
- public String getContentIdentifier() {
- return getName();
- }
-
- @Override
- public int hashCode() {
- return getResource().hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- } else if (obj == null) {
- return false;
- } else if (getClass() != obj.getClass()) {
- return false;
- }
- GitFolderResourceVariant other = (GitFolderResourceVariant) obj;
- return getResource().equals(other.getResource());
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IStorage;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.team.core.TeamException;
+
+class GitFolderResourceVariant extends GitResourceVariant {
+
+ GitFolderResourceVariant(IResource resource) {
+ super(resource);
+ }
+
+ IContainer getContainer() {
+ return (IContainer) getResource();
+ }
+
+ public boolean isContainer() {
+ return true;
+ }
+
+ public IStorage getStorage(IProgressMonitor monitor) throws TeamException {
+ return null;
+ }
+
+ public String getContentIdentifier() {
+ return getName();
+ }
+
+ @Override
+ public int hashCode() {
+ return getResource().hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ } else if (obj == null) {
+ return false;
+ } else if (getClass() != obj.getClass()) {
+ return false;
+ }
+ GitFolderResourceVariant other = (GitFolderResourceVariant) obj;
+ return getResource().equals(other.getResource());
+ }
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteResourceVariantTree.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteResourceVariantTree.java
index 1ce2e4d65e..4742a39bde 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteResourceVariantTree.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitRemoteResourceVariantTree.java
@@ -1,38 +1,38 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Dariusz Luksza <dariusz@luksza.org>
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import java.io.IOException;
-
-import org.eclipse.core.resources.IResource;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
-import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.Tree;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-
-class GitRemoteResourceVariantTree extends GitResourceVariantTree {
-
- GitRemoteResourceVariantTree(GitSynchronizeDataSet data, ResourceVariantByteStore store) {
- super(data, store);
- }
-
- @Override
- Tree getRevTree(IResource resource) throws IOException {
- return getSyncData().getData(resource.getProject()).mapDstTree();
- }
-
- @Override
- ObjectId getRevObjId(IResource resource) throws IOException {
- return getSyncData().getData(resource.getProject()).getDstObjectId();
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Dariusz Luksza <dariusz@luksza.org>
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import java.io.IOException;
+
+import org.eclipse.core.resources.IResource;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.Tree;
+import org.eclipse.team.core.variants.ResourceVariantByteStore;
+
+class GitRemoteResourceVariantTree extends GitResourceVariantTree {
+
+ GitRemoteResourceVariantTree(GitSynchronizeDataSet data, ResourceVariantByteStore store) {
+ super(data, store);
+ }
+
+ @Override
+ Tree getRevTree(IResource resource) throws IOException {
+ return getSyncData().getData(resource.getProject()).mapDstTree();
+ }
+
+ @Override
+ ObjectId getRevObjId(IResource resource) throws IOException {
+ return getSyncData().getData(resource.getProject()).getDstObjectId();
+ }
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java
index b24658b562..546da080b1 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariant.java
@@ -1,13 +1,13 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ *******************************************************************************/
package org.eclipse.egit.core.synchronize;
import org.eclipse.core.resources.IResource;
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantComparator.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantComparator.java
index 26fbd07657..5f5caed04d 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantComparator.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantComparator.java
@@ -1,163 +1,163 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Dariusz Luksza <dariusz@luksza.org>
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Arrays;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
-import org.eclipse.egit.core.Activator;
-import org.eclipse.egit.core.synchronize.GitBlobResourceVariant;
-import org.eclipse.egit.core.synchronize.GitFolderResourceVariant;
-import org.eclipse.egit.core.synchronize.GitResourceVariant;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.IResourceVariantComparator;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-
-class GitResourceVariantComparator implements IResourceVariantComparator {
-
- private final GitSynchronizeDataSet gsd;
- private final ResourceVariantByteStore store;
-
- public GitResourceVariantComparator(GitSynchronizeDataSet dataSet, ResourceVariantByteStore store) {
- gsd = dataSet;
- this.store = store;
- }
-
- public boolean compare(IResource local, IResourceVariant remote) {
- if (!local.exists() || remote == null) {
- return false;
- }
-
- if (local instanceof IFile) {
- if (remote.isContainer()) {
- return false;
- }
-
- InputStream stream = null;
- InputStream remoteStream = null;
- try {
- remoteStream = remote.getStorage(
- new NullProgressMonitor()).getContents();
- stream = getLocal(local);
- byte[] remoteBytes = new byte[8096];
- byte[] bytes = new byte[8096];
-
- int remoteRead = remoteStream.read(remoteBytes);
- int read = stream.read(bytes);
- if (remoteRead != read) {
- return false;
- }
-
- while (Arrays.equals(bytes, remoteBytes)) {
- remoteRead = remoteStream.read(remoteBytes);
- read = stream.read(bytes);
- if (remoteRead != read) {
- // didn't read the same amount, it's uneven
- return false;
- } else if (read == -1) {
- // both at EOF, check their contents
- return Arrays.equals(bytes, remoteBytes);
- }
- }
- } catch (IOException e) {
- logException(e);
- return false;
- } catch (CoreException e) {
- logException(e);
- return false;
- } finally {
- closeStream(stream);
- closeStream(remoteStream);
- }
- } else if (local instanceof IContainer) {
- if (!remote.isContainer()) {
- return false;
- }
-
- GitFolderResourceVariant gitVariant = (GitFolderResourceVariant) remote;
- return local.getFullPath().equals(
- gitVariant.getResource().getFullPath());
- }
- return false;
- }
-
- public boolean compare(IResourceVariant base, IResourceVariant remote) {
- GitResourceVariant gitBase = (GitResourceVariant) base;
- GitResourceVariant gitRemote = (GitResourceVariant) remote;
- IResource resourceBase = gitBase.getResource();
- IResource resourceRemote = gitRemote.getResource();
-
- if (!resourceBase.exists() || !resourceRemote.exists()) {
- return false;
- }
-
- if (base.isContainer()) {
- if (remote.isContainer()) {
- return resourceBase.getFullPath().equals(
- resourceRemote.getFullPath());
- }
- return false;
- } else if (remote.isContainer()) {
- return false;
- }
-
- GitBlobResourceVariant baseBlob = (GitBlobResourceVariant) base;
- GitBlobResourceVariant remoteBlob = (GitBlobResourceVariant) remote;
- return baseBlob.getId().equals(remoteBlob.getId());
- }
-
- public boolean isThreeWay() {
- return true;
- }
-
- private InputStream getLocal(IResource resource) throws CoreException {
- if (gsd.getData(resource.getProject()).shouldIncludeLocal()) {
- return ((IFile) resource).getContents();
- } else {
- try {
- byte[] bytes = store.getBytes(resource);
- return new ByteArrayInputStream(bytes != null ? bytes : new byte[0]);
- } catch (TeamException e) {
- throw new CoreException(e.getStatus());
- }
- }
-
- }
-
- private void logException(Exception e) {
- IStatus error = new Status(IStatus.ERROR, Activator
- .getPluginId(), e.getMessage(), e);
- Activator.getDefault().getLog().log(error);
- }
-
- private void closeStream(InputStream stream) {
- if (stream != null) {
- try {
- stream.close();
- } catch (IOException e) {
- logException(e);
- }
- }
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Dariusz Luksza <dariusz@luksza.org>
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
+import org.eclipse.egit.core.Activator;
+import org.eclipse.egit.core.synchronize.GitBlobResourceVariant;
+import org.eclipse.egit.core.synchronize.GitFolderResourceVariant;
+import org.eclipse.egit.core.synchronize.GitResourceVariant;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.core.variants.IResourceVariantComparator;
+import org.eclipse.team.core.variants.ResourceVariantByteStore;
+
+class GitResourceVariantComparator implements IResourceVariantComparator {
+
+ private final GitSynchronizeDataSet gsd;
+ private final ResourceVariantByteStore store;
+
+ public GitResourceVariantComparator(GitSynchronizeDataSet dataSet, ResourceVariantByteStore store) {
+ gsd = dataSet;
+ this.store = store;
+ }
+
+ public boolean compare(IResource local, IResourceVariant remote) {
+ if (!local.exists() || remote == null) {
+ return false;
+ }
+
+ if (local instanceof IFile) {
+ if (remote.isContainer()) {
+ return false;
+ }
+
+ InputStream stream = null;
+ InputStream remoteStream = null;
+ try {
+ remoteStream = remote.getStorage(
+ new NullProgressMonitor()).getContents();
+ stream = getLocal(local);
+ byte[] remoteBytes = new byte[8096];
+ byte[] bytes = new byte[8096];
+
+ int remoteRead = remoteStream.read(remoteBytes);
+ int read = stream.read(bytes);
+ if (remoteRead != read) {
+ return false;
+ }
+
+ while (Arrays.equals(bytes, remoteBytes)) {
+ remoteRead = remoteStream.read(remoteBytes);
+ read = stream.read(bytes);
+ if (remoteRead != read) {
+ // didn't read the same amount, it's uneven
+ return false;
+ } else if (read == -1) {
+ // both at EOF, check their contents
+ return Arrays.equals(bytes, remoteBytes);
+ }
+ }
+ } catch (IOException e) {
+ logException(e);
+ return false;
+ } catch (CoreException e) {
+ logException(e);
+ return false;
+ } finally {
+ closeStream(stream);
+ closeStream(remoteStream);
+ }
+ } else if (local instanceof IContainer) {
+ if (!remote.isContainer()) {
+ return false;
+ }
+
+ GitFolderResourceVariant gitVariant = (GitFolderResourceVariant) remote;
+ return local.getFullPath().equals(
+ gitVariant.getResource().getFullPath());
+ }
+ return false;
+ }
+
+ public boolean compare(IResourceVariant base, IResourceVariant remote) {
+ GitResourceVariant gitBase = (GitResourceVariant) base;
+ GitResourceVariant gitRemote = (GitResourceVariant) remote;
+ IResource resourceBase = gitBase.getResource();
+ IResource resourceRemote = gitRemote.getResource();
+
+ if (!resourceBase.exists() || !resourceRemote.exists()) {
+ return false;
+ }
+
+ if (base.isContainer()) {
+ if (remote.isContainer()) {
+ return resourceBase.getFullPath().equals(
+ resourceRemote.getFullPath());
+ }
+ return false;
+ } else if (remote.isContainer()) {
+ return false;
+ }
+
+ GitBlobResourceVariant baseBlob = (GitBlobResourceVariant) base;
+ GitBlobResourceVariant remoteBlob = (GitBlobResourceVariant) remote;
+ return baseBlob.getId().equals(remoteBlob.getId());
+ }
+
+ public boolean isThreeWay() {
+ return true;
+ }
+
+ private InputStream getLocal(IResource resource) throws CoreException {
+ if (gsd.getData(resource.getProject()).shouldIncludeLocal()) {
+ return ((IFile) resource).getContents();
+ } else {
+ try {
+ byte[] bytes = store.getBytes(resource);
+ return new ByteArrayInputStream(bytes != null ? bytes : new byte[0]);
+ } catch (TeamException e) {
+ throw new CoreException(e.getStatus());
+ }
+ }
+
+ }
+
+ private void logException(Exception e) {
+ IStatus error = new Status(IStatus.ERROR, Activator
+ .getPluginId(), e.getMessage(), e);
+ Activator.getDefault().getLog().log(error);
+ }
+
+ private void closeStream(InputStream stream) {
+ if (stream != null) {
+ try {
+ stream.close();
+ } catch (IOException e) {
+ logException(e);
+ }
+ }
+ }
+
+}
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
index bf316a6db5..5984a500e7 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/synchronize/GitResourceVariantTree.java
@@ -1,425 +1,425 @@
-/*******************************************************************************
- * Copyright (c) 2010 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- * Dariusz Luksza <dariusz@luksza.org>
- *******************************************************************************/
-package org.eclipse.egit.core.synchronize;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubMonitor;
-import org.eclipse.egit.core.Activator;
-import org.eclipse.egit.core.CoreText;
-import org.eclipse.egit.core.project.RepositoryMapping;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeData;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
-import org.eclipse.jgit.lib.AbstractIndexTreeVisitor;
-import org.eclipse.jgit.lib.IndexTreeWalker;
-import org.eclipse.jgit.lib.ObjectId;
-import org.eclipse.jgit.lib.ObjectLoader;
-import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.Tree;
-import org.eclipse.jgit.lib.TreeEntry;
-import org.eclipse.jgit.lib.GitIndex.Entry;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.revwalk.RevCommitList;
-import org.eclipse.jgit.revwalk.RevSort;
-import org.eclipse.jgit.revwalk.RevWalk;
-import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
-import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
-import org.eclipse.jgit.treewalk.filter.TreeFilter;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.variants.AbstractResourceVariantTree;
-import org.eclipse.team.core.variants.IResourceVariant;
-import org.eclipse.team.core.variants.ResourceVariantByteStore;
-
-abstract class GitResourceVariantTree extends AbstractResourceVariantTree {
-
- /**
- * A map of a given resource's trail of commits.
- */
- private Map<String, RevCommitList<RevCommit>> dates = new HashMap<String, RevCommitList<RevCommit>>();
-
- /**
- * A map of a given resource to its latest blob within the branch.
- */
- private Map<String, ObjectId> updated = new HashMap<String, ObjectId>();
-
- /**
- * A map of repositories to their trees.
- */
- private Map<Repository, Tree> trees = new HashMap<Repository, Tree>();
-
- private GitSynchronizeDataSet gsdData;
-
- private final ResourceVariantByteStore store;
-
- GitResourceVariantTree(GitSynchronizeDataSet data,
- ResourceVariantByteStore store) {
- this.store = store;
- this.gsdData = data;
- }
-
- public IResource[] roots() {
- Set<IResource> roots = new HashSet<IResource>();
- for (GitSynchronizeData gsd : gsdData) {
- roots.addAll(gsd.getProjects());
- }
- return roots.toArray(new IResource[roots.size()]);
- }
-
- public IResource[] members(IResource resource) throws TeamException {
- if (resource.exists() && resource instanceof IContainer) {
- GitSynchronizeData gsd = getSyncData().getData(
- resource.getProject());
- if (gsd.shouldIncludeLocal()) {
- try {
- return ((IContainer) resource).members();
- } catch (CoreException e) {
- throw new TeamException(e.getStatus());
- }
- } else {
- return getMembersAndStore(resource, gsd);
- }
- }
- return new IResource[0];
- }
-
- /**
- * Returns whether this file is of interest to this resource variant tree.
- * Due to the fact that a repository may have many, many files, we only want
- * to retrieve and store information about files that the user is actually
- * interested in. That is, if they only wish to synchronize on one project,
- * then there is no reason for this tree to be storing information about
- * other projects that are contained within the repository.
- *
- * @param file
- * the file to check
- * @return <code>true</code> if the blob information about this file is of
- * interest to this tree, <code>false</code> otherwise
- */
- private boolean contains(File file) {
- for (GitSynchronizeData gsd : gsdData) {
- if (gsd.contains(file)) {
- return true;
- }
- }
-
- return false;
- }
-
- /**
- * Retrieves the name of the branch that this variant tree should be
- * compared against for the given resource.
- *
- * @param resource
- * the resource that is being compared for
- * @return the name of the target comparison branch
- * @throws IOException
- */
- abstract Tree getRevTree(IResource resource) throws IOException;
-
- abstract ObjectId getRevObjId(IResource resource) throws IOException;
-
- /**
- * Initializes the repository information for the specified resource.
- *
- * @param resource
- * the resource that needs to have its repository information
- * initialized for
- * @throws IOException
- * if an error occurs while walking the branch
- */
- private synchronized void initialize(IResource resource) throws IOException {
- IProject project = resource.getProject();
- if (!gsdData.contains(project)) {
- return;
- }
-
- Repository db = gsdData.getData(project).getRepository();
- if (!trees.containsKey(db)) {
- Tree tree = getRevTree(resource);
- ObjectId objId = getRevObjId(resource);
-
- trees.put(db, tree);
- // walk the tree to retrieve information
- walk(db, objId, tree);
- }
- }
-
- private void walk(final Repository db, final ObjectId objId, Tree merge)
- throws IOException {
- IndexTreeWalker walker = new IndexTreeWalker(db.getIndex(), merge, db
- .getWorkDir(), new AbstractIndexTreeVisitor() {
- public void visitEntry(TreeEntry treeEntry, Entry indexEntry,
- File file) throws IOException {
- if (treeEntry != null && contains(file)) {
- store(db, objId, treeEntry);
- }
- }
- });
- walker.walk();
- }
-
- private void store(Repository db, ObjectId objId, TreeEntry treeEntry)
- throws IOException {
- String entry = treeEntry.getFullName();
- RevWalk walk = new RevWalk(db);
- walk.sort(RevSort.COMMIT_TIME_DESC, true);
- walk.sort(RevSort.BOUNDARY, true);
- walk.markStart(walk.parseCommit(objId));
- walk.setTreeFilter(AndTreeFilter.create(PathFilterGroup
- .createFromStrings(Collections.singleton(entry)),
- TreeFilter.ANY_DIFF));
-
- RevCommitList<RevCommit> list = new RevCommitList<RevCommit>();
- list.source(walk);
-
- int lastSize = 0;
- do {
- lastSize = list.size();
- list.fillTo(Integer.MAX_VALUE);
- } while (lastSize != list.size());
-
- dates.put(entry, list);
- updated.put(entry, treeEntry.getId());
- }
-
- public IResourceVariant getResourceVariant(IResource resource)
- throws TeamException {
- return fetchVariant(resource, 0, new NullProgressMonitor());
- }
-
- private IResourceVariant findFolderVariant(IResource resource,
- Repository repository) {
- File workDir = repository.getWorkDir();
- File resourceLocation = resource.getLocation().toFile();
- String resLocationAbsolutePath = resourceLocation.getAbsolutePath();
-
- for (Map.Entry<String, ObjectId> entry : updated.entrySet()) {
- String entryName = entry.getKey();
- File file = new File(workDir, entryName);
-
- if (file.getAbsolutePath().startsWith(resLocationAbsolutePath)) {
- return new GitFolderResourceVariant(resource);
- }
-
- }
-
- return null;
- }
-
- private IResourceVariant findFileVariant(IResource resource,
- Repository repository) throws TeamException {
- String gitPath = RepositoryMapping.getMapping(resource)
- .getRepoRelativePath(resource);
- ObjectId objectId = updated.get(gitPath);
- if (objectId != null) {
- File root = repository.getWorkDir();
- File file = new File(root, gitPath);
-
- if (resource.getLocation().toFile().equals(file)) {
- try {
- Tree merge = trees.get(repository);
- TreeEntry tree = merge.findBlobMember(gitPath);
- GitBlobResourceVariant variant = new GitBlobResourceVariant(
- resource, repository, tree.getId(), dates
- .get(gitPath));
- return variant;
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, Activator
- .getPluginId(), NLS.bind(
- CoreText.GitResourceVariantTree_couldNotFindBlob,
- gitPath), e));
- }
- }
- }
- return null;
- }
-
- public boolean hasResourceVariant(IResource resource) throws TeamException {
- return getResourceVariant(resource) != null;
- }
-
- public void flushVariants(IResource resource, int depth)
- throws TeamException {
- // nothing do to here
- // TODO implement ?
- }
-
- @Override
- protected IResourceVariant[] fetchMembers(IResourceVariant variant,
- IProgressMonitor progress) throws TeamException {
- if (!variant.isContainer()) {
- return new IResourceVariant[0];
- }
-
- IProgressMonitor monitor = SubMonitor.convert(progress);
-
- Set<IResourceVariant> members = new HashSet<IResourceVariant>();
- try {
- GitFolderResourceVariant folderVariant = (GitFolderResourceVariant) variant;
- IContainer container = folderVariant.getContainer();
- File resourceLocation = container.getLocation().toFile();
- IProject project = container.getProject();
-
- Repository repository = gsdData.getData(project).getRepository();
-
- monitor.beginTask(NLS.bind(
- CoreText.GitResourceVariantTree_fetchingMembers, container
- .getLocation()), updated.size());
- File root = repository.getWorkDir();
-
- for (Map.Entry<String, ObjectId> entry : updated.entrySet()) {
- String entryName = entry.getKey();
- File file = new File(root, entryName);
-
- if (file.getAbsolutePath().startsWith(
- resourceLocation.getAbsolutePath())) {
- members.add(getMember(container, repository, entryName));
- }
-
- monitor.worked(1);
- }
- } finally {
- monitor.done();
- }
- return members.toArray(new IResourceVariant[members.size()]);
- }
-
- private IResourceVariant getMember(IContainer container,
- Repository repository, String entryName) throws TeamException {
- String gitPath = RepositoryMapping.getMapping(container)
- .getRepoRelativePath(container);
- Tree merge = trees.get(repository);
- try {
- TreeEntry tree = merge.findBlobMember(entryName);
- GitBlobResourceVariant blobVariant = new GitBlobResourceVariant(
- container.getFile(new Path(entryName)), repository, tree
- .getId(), dates.get(entryName));
- return blobVariant;
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, Activator
- .getPluginId(), NLS.bind(
- CoreText.GitResourceVariantTree_couldNotFindBlob, gitPath),
- e));
- }
- }
-
- private IResourceVariant fetchVariant(IResource resource,
- IProgressMonitor monitor) throws TeamException {
- try {
- monitor.beginTask(NLS.bind(
- CoreText.GitResourceVariantTree_fetchingVariant, resource
- .getLocation()), 5);
- initialize(resource);
- monitor.worked(4);
- } catch (IOException e) {
- throw new TeamException(new Status(IStatus.ERROR, Activator
- .getPluginId(), NLS.bind(
- CoreText.GitResourceVariantTree_unableToReadRepository,
- resource.getName()), e));
- }
-
- Repository repository = gsdData.getData(resource.getProject())
- .getRepository();
-
- if (resource instanceof IProject) {
- return new GitFolderResourceVariant(resource);
- } else if (resource instanceof IFolder) {
- return findFolderVariant(resource, repository);
- }
-
- return findFileVariant(resource, repository);
- }
-
- @Override
- protected IResourceVariant fetchVariant(IResource resource, int depth,
- IProgressMonitor monitor) throws TeamException {
- try {
- return fetchVariant(resource, monitor);
- } finally {
- monitor.done();
- }
- }
-
- @Override
- protected boolean setVariant(IResource local, IResourceVariant remote)
- throws TeamException {
- return true;
- }
-
- protected GitSynchronizeDataSet getSyncData() {
- return gsdData;
- }
-
- private IResource[] getMembersAndStore(IResource resource,
- GitSynchronizeData gsd) throws TeamException {
- Repository repo = gsd.getRepository();
- try {
- Tree tree = gsd.mapSrcTree();
- IResource[] members = ((IContainer) resource).members();
- Set<IResource> membersSet = getAllMembers(repo, tree, members);
-
- return membersSet.toArray(new IResource[membersSet.size()]);
- } catch (IOException e) {
- throw new TeamException(e.getMessage(), e);
- } catch (CoreException e) {
- throw TeamException.asTeamException(e);
- }
- }
-
- private Set<IResource> getAllMembers(Repository repo, Tree tree,
- IResource[] members) throws IOException, TeamException {
- Set<IResource> membersSet = new HashSet<IResource>();
-
- for (IResource member : members) {
- if (member.getType() == IResource.FILE) {
- String repoWorkDir = repo.getWorkDir().toString();
- String memberRelPath = member.getLocation().toString();
- memberRelPath = memberRelPath.replace(repoWorkDir, ""); //$NON-NLS-1$
- if (memberRelPath.startsWith(File.separator)) {
- memberRelPath = memberRelPath.substring(1);
- }
- TreeEntry entry = tree.findBlobMember(memberRelPath);
- if (entry != null) {
- ObjectLoader objLoader = repo.openBlob(entry.getId());
- store.setBytes(member, objLoader.getCachedBytes());
- membersSet.add(member);
- }
- } else if (member.getType() == IResource.FOLDER ) {
- try {
- IResource[] resources = ((IContainer) member).members();
- membersSet.addAll(getAllMembers(repo, tree, resources));
- } catch (CoreException e) {
- throw new TeamException(e.getStatus());
- }
- }
- }
- return membersSet;
- }
-
-}
+/*******************************************************************************
+ * Copyright (c) 2010 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ * Dariusz Luksza <dariusz@luksza.org>
+ *******************************************************************************/
+package org.eclipse.egit.core.synchronize;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.egit.core.Activator;
+import org.eclipse.egit.core.CoreText;
+import org.eclipse.egit.core.project.RepositoryMapping;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeData;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
+import org.eclipse.jgit.lib.AbstractIndexTreeVisitor;
+import org.eclipse.jgit.lib.IndexTreeWalker;
+import org.eclipse.jgit.lib.ObjectId;
+import org.eclipse.jgit.lib.ObjectLoader;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.Tree;
+import org.eclipse.jgit.lib.TreeEntry;
+import org.eclipse.jgit.lib.GitIndex.Entry;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.revwalk.RevCommitList;
+import org.eclipse.jgit.revwalk.RevSort;
+import org.eclipse.jgit.revwalk.RevWalk;
+import org.eclipse.jgit.treewalk.filter.AndTreeFilter;
+import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
+import org.eclipse.jgit.treewalk.filter.TreeFilter;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.team.core.TeamException;
+import org.eclipse.team.core.variants.AbstractResourceVariantTree;
+import org.eclipse.team.core.variants.IResourceVariant;
+import org.eclipse.team.core.variants.ResourceVariantByteStore;
+
+abstract class GitResourceVariantTree extends AbstractResourceVariantTree {
+
+ /**
+ * A map of a given resource's trail of commits.
+ */
+ private Map<String, RevCommitList<RevCommit>> dates = new HashMap<String, RevCommitList<RevCommit>>();
+
+ /**
+ * A map of a given resource to its latest blob within the branch.
+ */
+ private Map<String, ObjectId> updated = new HashMap<String, ObjectId>();
+
+ /**
+ * A map of repositories to their trees.
+ */
+ private Map<Repository, Tree> trees = new HashMap<Repository, Tree>();
+
+ private GitSynchronizeDataSet gsdData;
+
+ private final ResourceVariantByteStore store;
+
+ GitResourceVariantTree(GitSynchronizeDataSet data,
+ ResourceVariantByteStore store) {
+ this.store = store;
+ this.gsdData = data;
+ }
+
+ public IResource[] roots() {
+ Set<IResource> roots = new HashSet<IResource>();
+ for (GitSynchronizeData gsd : gsdData) {
+ roots.addAll(gsd.getProjects());
+ }
+ return roots.toArray(new IResource[roots.size()]);
+ }
+
+ public IResource[] members(IResource resource) throws TeamException {
+ if (resource.exists() && resource instanceof IContainer) {
+ GitSynchronizeData gsd = getSyncData().getData(
+ resource.getProject());
+ if (gsd.shouldIncludeLocal()) {
+ try {
+ return ((IContainer) resource).members();
+ } catch (CoreException e) {
+ throw new TeamException(e.getStatus());
+ }
+ } else {
+ return getMembersAndStore(resource, gsd);
+ }
+ }
+ return new IResource[0];
+ }
+
+ /**
+ * Returns whether this file is of interest to this resource variant tree.
+ * Due to the fact that a repository may have many, many files, we only want
+ * to retrieve and store information about files that the user is actually
+ * interested in. That is, if they only wish to synchronize on one project,
+ * then there is no reason for this tree to be storing information about
+ * other projects that are contained within the repository.
+ *
+ * @param file
+ * the file to check
+ * @return <code>true</code> if the blob information about this file is of
+ * interest to this tree, <code>false</code> otherwise
+ */
+ private boolean contains(File file) {
+ for (GitSynchronizeData gsd : gsdData) {
+ if (gsd.contains(file)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Retrieves the name of the branch that this variant tree should be
+ * compared against for the given resource.
+ *
+ * @param resource
+ * the resource that is being compared for
+ * @return the name of the target comparison branch
+ * @throws IOException
+ */
+ abstract Tree getRevTree(IResource resource) throws IOException;
+
+ abstract ObjectId getRevObjId(IResource resource) throws IOException;
+
+ /**
+ * Initializes the repository information for the specified resource.
+ *
+ * @param resource
+ * the resource that needs to have its repository information
+ * initialized for
+ * @throws IOException
+ * if an error occurs while walking the branch
+ */
+ private synchronized void initialize(IResource resource) throws IOException {
+ IProject project = resource.getProject();
+ if (!gsdData.contains(project)) {
+ return;
+ }
+
+ Repository db = gsdData.getData(project).getRepository();
+ if (!trees.containsKey(db)) {
+ Tree tree = getRevTree(resource);
+ ObjectId objId = getRevObjId(resource);
+
+ trees.put(db, tree);
+ // walk the tree to retrieve information
+ walk(db, objId, tree);
+ }
+ }
+
+ private void walk(final Repository db, final ObjectId objId, Tree merge)
+ throws IOException {
+ IndexTreeWalker walker = new IndexTreeWalker(db.getIndex(), merge, db
+ .getWorkDir(), new AbstractIndexTreeVisitor() {
+ public void visitEntry(TreeEntry treeEntry, Entry indexEntry,
+ File file) throws IOException {
+ if (treeEntry != null && contains(file)) {
+ store(db, objId, treeEntry);
+ }
+ }
+ });
+ walker.walk();
+ }
+
+ private void store(Repository db, ObjectId objId, TreeEntry treeEntry)
+ throws IOException {
+ String entry = treeEntry.getFullName();
+ RevWalk walk = new RevWalk(db);
+ walk.sort(RevSort.COMMIT_TIME_DESC, true);
+ walk.sort(RevSort.BOUNDARY, true);
+ walk.markStart(walk.parseCommit(objId));
+ walk.setTreeFilter(AndTreeFilter.create(PathFilterGroup
+ .createFromStrings(Collections.singleton(entry)),
+ TreeFilter.ANY_DIFF));
+
+ RevCommitList<RevCommit> list = new RevCommitList<RevCommit>();
+ list.source(walk);
+
+ int lastSize = 0;
+ do {
+ lastSize = list.size();
+ list.fillTo(Integer.MAX_VALUE);
+ } while (lastSize != list.size());
+
+ dates.put(entry, list);
+ updated.put(entry, treeEntry.getId());
+ }
+
+ public IResourceVariant getResourceVariant(IResource resource)
+ throws TeamException {
+ return fetchVariant(resource, 0, new NullProgressMonitor());
+ }
+
+ private IResourceVariant findFolderVariant(IResource resource,
+ Repository repository) {
+ File workDir = repository.getWorkDir();
+ File resourceLocation = resource.getLocation().toFile();
+ String resLocationAbsolutePath = resourceLocation.getAbsolutePath();
+
+ for (Map.Entry<String, ObjectId> entry : updated.entrySet()) {
+ String entryName = entry.getKey();
+ File file = new File(workDir, entryName);
+
+ if (file.getAbsolutePath().startsWith(resLocationAbsolutePath)) {
+ return new GitFolderResourceVariant(resource);
+ }
+
+ }
+
+ return null;
+ }
+
+ private IResourceVariant findFileVariant(IResource resource,
+ Repository repository) throws TeamException {
+ String gitPath = RepositoryMapping.getMapping(resource)
+ .getRepoRelativePath(resource);
+ ObjectId objectId = updated.get(gitPath);
+ if (objectId != null) {
+ File root = repository.getWorkDir();
+ File file = new File(root, gitPath);
+
+ if (resource.getLocation().toFile().equals(file)) {
+ try {
+ Tree merge = trees.get(repository);
+ TreeEntry tree = merge.findBlobMember(gitPath);
+ GitBlobResourceVariant variant = new GitBlobResourceVariant(
+ resource, repository, tree.getId(), dates
+ .get(gitPath));
+ return variant;
+ } catch (IOException e) {
+ throw new TeamException(new Status(IStatus.ERROR, Activator
+ .getPluginId(), NLS.bind(
+ CoreText.GitResourceVariantTree_couldNotFindBlob,
+ gitPath), e));
+ }
+ }
+ }
+ return null;
+ }
+
+ public boolean hasResourceVariant(IResource resource) throws TeamException {
+ return getResourceVariant(resource) != null;
+ }
+
+ public void flushVariants(IResource resource, int depth)
+ throws TeamException {
+ // nothing do to here
+ // TODO implement ?
+ }
+
+ @Override
+ protected IResourceVariant[] fetchMembers(IResourceVariant variant,
+ IProgressMonitor progress) throws TeamException {
+ if (!variant.isContainer()) {
+ return new IResourceVariant[0];
+ }
+
+ IProgressMonitor monitor = SubMonitor.convert(progress);
+
+ Set<IResourceVariant> members = new HashSet<IResourceVariant>();
+ try {
+ GitFolderResourceVariant folderVariant = (GitFolderResourceVariant) variant;
+ IContainer container = folderVariant.getContainer();
+ File resourceLocation = container.getLocation().toFile();
+ IProject project = container.getProject();
+
+ Repository repository = gsdData.getData(project).getRepository();
+
+ monitor.beginTask(NLS.bind(
+ CoreText.GitResourceVariantTree_fetchingMembers, container
+ .getLocation()), updated.size());
+ File root = repository.getWorkDir();
+
+ for (Map.Entry<String, ObjectId> entry : updated.entrySet()) {
+ String entryName = entry.getKey();
+ File file = new File(root, entryName);
+
+ if (file.getAbsolutePath().startsWith(
+ resourceLocation.getAbsolutePath())) {
+ members.add(getMember(container, repository, entryName));
+ }
+
+ monitor.worked(1);
+ }
+ } finally {
+ monitor.done();
+ }
+ return members.toArray(new IResourceVariant[members.size()]);
+ }
+
+ private IResourceVariant getMember(IContainer container,
+ Repository repository, String entryName) throws TeamException {
+ String gitPath = RepositoryMapping.getMapping(container)
+ .getRepoRelativePath(container);
+ Tree merge = trees.get(repository);
+ try {
+ TreeEntry tree = merge.findBlobMember(entryName);
+ GitBlobResourceVariant blobVariant = new GitBlobResourceVariant(
+ container.getFile(new Path(entryName)), repository, tree
+ .getId(), dates.get(entryName));
+ return blobVariant;
+ } catch (IOException e) {
+ throw new TeamException(new Status(IStatus.ERROR, Activator
+ .getPluginId(), NLS.bind(
+ CoreText.GitResourceVariantTree_couldNotFindBlob, gitPath),
+ e));
+ }
+ }
+
+ private IResourceVariant fetchVariant(IResource resource,
+ IProgressMonitor monitor) throws TeamException {
+ try {
+ monitor.beginTask(NLS.bind(
+ CoreText.GitResourceVariantTree_fetchingVariant, resource
+ .getLocation()), 5);
+ initialize(resource);
+ monitor.worked(4);
+ } catch (IOException e) {
+ throw new TeamException(new Status(IStatus.ERROR, Activator
+ .getPluginId(), NLS.bind(
+ CoreText.GitResourceVariantTree_unableToReadRepository,
+ resource.getName()), e));
+ }
+
+ Repository repository = gsdData.getData(resource.getProject())
+ .getRepository();
+
+ if (resource instanceof IProject) {
+ return new GitFolderResourceVariant(resource);
+ } else if (resource instanceof IFolder) {
+ return findFolderVariant(resource, repository);
+ }
+
+ return findFileVariant(resource, repository);
+ }
+
+ @Override
+ protected IResourceVariant fetchVariant(IResource resource, int depth,
+ IProgressMonitor monitor) throws TeamException {
+ try {
+ return fetchVariant(resource, monitor);
+ } finally {
+ monitor.done();
+ }
+ }
+
+ @Override
+ protected boolean setVariant(IResource local, IResourceVariant remote)
+ throws TeamException {
+ return true;
+ }
+
+ protected GitSynchronizeDataSet getSyncData() {
+ return gsdData;
+ }
+
+ private IResource[] getMembersAndStore(IResource resource,
+ GitSynchronizeData gsd) throws TeamException {
+ Repository repo = gsd.getRepository();
+ try {
+ Tree tree = gsd.mapSrcTree();
+ IResource[] members = ((IContainer) resource).members();
+ Set<IResource> membersSet = getAllMembers(repo, tree, members);
+
+ return membersSet.toArray(new IResource[membersSet.size()]);
+ } catch (IOException e) {
+ throw new TeamException(e.getMessage(), e);
+ } catch (CoreException e) {
+ throw TeamException.asTeamException(e);
+ }
+ }
+
+ private Set<IResource> getAllMembers(Repository repo, Tree tree,
+ IResource[] members) throws IOException, TeamException {
+ Set<IResource> membersSet = new HashSet<IResource>();
+
+ for (IResource member : members) {
+ if (member.getType() == IResource.FILE) {
+ String repoWorkDir = repo.getWorkDir().toString();
+ String memberRelPath = member.getLocation().toString();
+ memberRelPath = memberRelPath.replace(repoWorkDir, ""); //$NON-NLS-1$
+ if (memberRelPath.startsWith(File.separator)) {
+ memberRelPath = memberRelPath.substring(1);
+ }
+ TreeEntry entry = tree.findBlobMember(memberRelPath);
+ if (entry != null) {
+ ObjectLoader objLoader = repo.openBlob(entry.getId());
+ store.setBytes(member, objLoader.getCachedBytes());
+ membersSet.add(member);
+ }
+ } else if (member.getType() == IResource.FOLDER ) {
+ try {
+ IResource[] resources = ((IContainer) member).members();
+ membersSet.addAll(getAllMembers(repo, tree, resources));
+ } catch (CoreException e) {
+ throw new TeamException(e.getStatus());
+ }
+ }
+ }
+ return membersSet;
+ }
+
+}

Back to the top