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
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>
-rw-r--r--org.eclipse.egit-feature/.settings/org.eclipse.core.runtime.prefs6
-rw-r--r--org.eclipse.egit-updatesite/.settings/org.eclipse.core.runtime.prefs6
-rw-r--r--org.eclipse.egit.core.test/.settings/org.eclipse.core.runtime.prefs6
-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
-rw-r--r--org.eclipse.egit.doc/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.egit.doc/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.egit.doc/build-help.xml112
-rw-r--r--org.eclipse.egit.ui.test/.settings/org.eclipse.core.resources.prefs3
-rw-r--r--org.eclipse.egit.ui.test/.settings/org.eclipse.core.runtime.prefs3
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/AllTests.java46
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java202
-rw-r--r--org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java486
-rw-r--r--org.eclipse.egit.ui/.settings/org.eclipse.core.runtime.prefs6
-rw-r--r--org.eclipse.egit.ui/.settings/org.eclipse.jdt.core.prefs716
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java296
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitSynchronizeWizard.java116
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/GitTraceLocation.java290
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/ITraceLocation.java60
-rw-r--r--org.eclipse.egit/.settings/org.eclipse.core.runtime.prefs6
-rw-r--r--org.eclipse.egit/.settings/org.eclipse.jdt.core.prefs14
30 files changed, 2569 insertions, 2557 deletions
diff --git a/org.eclipse.egit-feature/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit-feature/.settings/org.eclipse.core.runtime.prefs
index f468d739b..a8c8a9520 100644
--- a/org.eclipse.egit-feature/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit-feature/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:55:38 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:55:38 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit-updatesite/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit-updatesite/.settings/org.eclipse.core.runtime.prefs
index fc5b578c1..4f21775ea 100644
--- a/org.eclipse.egit-updatesite/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit-updatesite/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:55:44 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:55:44 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit.core.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit.core.test/.settings/org.eclipse.core.runtime.prefs
index 29b7c796c..c8f089af7 100644
--- a/org.eclipse.egit.core.test/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit.core.test/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:54:45 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:54:45 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
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 b6db226b2..dfc3779a1 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 d30cb5f09..f34582e98 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 382283f44..a5ce9db44 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 546511120..23f191f2a 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 3c5c4e037..9ef41da54 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 47e5e4c93..8f78cdaaf 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 75182d528..682db175f 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 1ce2e4d65..4742a39bd 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 b24658b56..546da080b 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 26fbd0765..5f5caed04 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 bf316a6db..5984a500e 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;
+ }
+
+}
diff --git a/org.eclipse.egit.doc/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egit.doc/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..3e2e5bb67
--- /dev/null
+++ b/org.eclipse.egit.doc/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Fri Jun 18 23:34:23 CEST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.egit.doc/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit.doc/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..d2a88dc8c
--- /dev/null
+++ b/org.eclipse.egit.doc/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Fri Jun 18 23:34:23 CEST 2010
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit.doc/build-help.xml b/org.eclipse.egit.doc/build-help.xml
index 66e068c8a..2e7fee2ed 100644
--- a/org.eclipse.egit.doc/build-help.xml
+++ b/org.eclipse.egit.doc/build-help.xml
@@ -1,56 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project name="org.eclipse.egit.doc" basedir="." default="all">
-<!--
- Copyright (c) 2010 Chris Aniszczyk and others.
- Copyright (c) 2010 Matthias Sohn <matthias.sohn@sap.com>
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Public License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/legal/epl-v10.html
-
- Contributors:
- Chris Aniszczyk - initial API and implementation
- Matthias Sohn - maven integration, update to wikitext 1.3, adding additional wikis
--->
- <description>
- Generate Eclipse help content for the EGit user guide
- </description>
-
- <path id="wikitext.tasks.classpath">
- <pathelement path="${compile_classpath}"/>
- </path>
- <echo message="compile classpath: ${compile_classpath}"/>
- <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties"/>
- <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/>
-
- <property name="egit.help.doc.url.base" value="http://wiki.eclipse.org" />
-
- <target name="all" description="Generate Eclipse help content for the EGit documentation">
- <sequential>
- <delete failonerror="false">
- <fileset dir="${basedir}/help/images" />
- </delete>
-
- <mediawiki-to-eclipse-help wikiBaseUrl="${egit.help.doc.url.base}"
- validate="true" failonvalidationerror="true" prependImagePrefix="images"
- formatoutput="true" defaultAbsoluteLinkTarget="egit_external" dest="${basedir}/help"
- navigationimages="true" title="EGit Documentation" helpPrefix="help"
- generateUnifiedToc="true">
- <path name="EGit/User_Guide" title="EGit User Guide" />
- <path name="EGit/Git_For_Eclipse_Users" title="Git for Eclipse Users" />
- <stylesheet url="book.css" />
- <pageAppendum>
-
- = Updating This Document =
-
- This document is maintained in a collaborative wiki. If you wish to
- update or modify this document please visit
- {url}</pageAppendum>
- </mediawiki-to-eclipse-help>
- <mkdir dir="help/images" />
- <copy todir="${basedir}/help/images" overwrite="true">
- <fileset dir="images" />
- </copy>
- </sequential>
- </target>
-</project>
+<?xml version="1.0" encoding="UTF-8"?>
+<project name="org.eclipse.egit.doc" basedir="." default="all">
+<!--
+ Copyright (c) 2010 Chris Aniszczyk and others.
+ Copyright (c) 2010 Matthias Sohn <matthias.sohn@sap.com>
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Chris Aniszczyk - initial API and implementation
+ Matthias Sohn - maven integration, update to wikitext 1.3, adding additional wikis
+-->
+ <description>
+ Generate Eclipse help content for the EGit user guide
+ </description>
+
+ <path id="wikitext.tasks.classpath">
+ <pathelement path="${compile_classpath}"/>
+ </path>
+ <echo message="compile classpath: ${compile_classpath}"/>
+ <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/internal/wikitext/mediawiki/core/tasks/tasks.properties"/>
+ <taskdef classpathref="wikitext.tasks.classpath" resource="org/eclipse/mylyn/wikitext/core/util/anttask/tasks.properties"/>
+
+ <property name="egit.help.doc.url.base" value="http://wiki.eclipse.org" />
+
+ <target name="all" description="Generate Eclipse help content for the EGit documentation">
+ <sequential>
+ <delete failonerror="false">
+ <fileset dir="${basedir}/help/images" />
+ </delete>
+
+ <mediawiki-to-eclipse-help wikiBaseUrl="${egit.help.doc.url.base}"
+ validate="true" failonvalidationerror="true" prependImagePrefix="images"
+ formatoutput="true" defaultAbsoluteLinkTarget="egit_external" dest="${basedir}/help"
+ navigationimages="true" title="EGit Documentation" helpPrefix="help"
+ generateUnifiedToc="true">
+ <path name="EGit/User_Guide" title="EGit User Guide" />
+ <path name="EGit/Git_For_Eclipse_Users" title="Git for Eclipse Users" />
+ <stylesheet url="book.css" />
+ <pageAppendum>
+
+ = Updating This Document =
+
+ This document is maintained in a collaborative wiki. If you wish to
+ update or modify this document please visit
+ {url}</pageAppendum>
+ </mediawiki-to-eclipse-help>
+ <mkdir dir="help/images" />
+ <copy todir="${basedir}/help/images" overwrite="true">
+ <fileset dir="images" />
+ </copy>
+ </sequential>
+ </target>
+</project>
diff --git a/org.eclipse.egit.ui.test/.settings/org.eclipse.core.resources.prefs b/org.eclipse.egit.ui.test/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 000000000..acf43fe4a
--- /dev/null
+++ b/org.eclipse.egit.ui.test/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+#Fri Jun 18 23:34:07 CEST 2010
+eclipse.preferences.version=1
+encoding/<project>=UTF-8
diff --git a/org.eclipse.egit.ui.test/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit.ui.test/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 000000000..7fc9adbd1
--- /dev/null
+++ b/org.eclipse.egit.ui.test/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,3 @@
+#Fri Jun 18 23:34:07 CEST 2010
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/AllTests.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/AllTests.java
index 7b0133113..8f8cb0fc2 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/AllTests.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/AllTests.java
@@ -1,23 +1,23 @@
-/*******************************************************************************
- * Copyright (C) 2010, Ketan Padegaonkar <KetanPadegaonkar@gmail.com>
- *
- * 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
- *******************************************************************************/
-package org.eclipse.egit.ui.test;
-
-import org.eclipse.egit.ui.view.repositories.GitRepositoriesViewTest;
-import org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest;
-import org.eclipse.egit.ui.wizards.share.SharingWizardTest;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-import org.junit.runners.Suite.SuiteClasses;
-
-@RunWith(Suite.class)
-@SuiteClasses( { GitCloneWizardTest.class, SharingWizardTest.class,
- GitRepositoriesViewTest.class })
-public class AllTests {
- // empty class, don't need anything here
-}
+/*******************************************************************************
+ * Copyright (C) 2010, Ketan Padegaonkar <KetanPadegaonkar@gmail.com>
+ *
+ * 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
+ *******************************************************************************/
+package org.eclipse.egit.ui.test;
+
+import org.eclipse.egit.ui.view.repositories.GitRepositoriesViewTest;
+import org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest;
+import org.eclipse.egit.ui.wizards.share.SharingWizardTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses( { GitCloneWizardTest.class, SharingWizardTest.class,
+ GitRepositoriesViewTest.class })
+public class AllTests {
+ // empty class, don't need anything here
+}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
index 1c0b6d6d8..366be1a77 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/test/TestUtil.java
@@ -1,101 +1,101 @@
-/*******************************************************************************
- * 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.ui.test;
-
-import java.util.Locale;
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-import org.eclipse.egit.ui.Activator;
-import org.eclipse.osgi.service.localization.BundleLocalization;
-import org.osgi.framework.BundleContext;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * Utilities to be used by SWTBot tests
- */
-public class TestUtil {
-
- private static final char AMPERSAND = '&';
-
- private static final TestUtil INSTANCE = new TestUtil();
-
- public static TestUtil getInstance() {
- return INSTANCE;
- }
-
- private ResourceBundle myBundle;
-
- /**
- * Allows access to the localized values of the EGit UI Plug-in
- * <p>
- * This will effectively read the plugin.properties. Ampersands (often used
- * in menu items and field labels for keyboard shortcuts) will be filtered
- * out (see also {@link #getPluginLocalizedValue(String, boolean)} in order
- * to be able to reference these fields using SWTBot).
- *
- * @param key
- * the key, must not be null
- * @return the localized value in the current default {@link Locale}, or
- * null
- * @throws MissingResourceException
- * if no value is found for the given key
- */
- public synchronized String getPluginLocalizedValue(String key)
- throws MissingResourceException {
- return getPluginLocalizedValue(key, false);
- }
-
- /**
- * Allows access to the localized values of the EGit UI Plug-in
- * <p>
- *
- * @param key
- * see {@link #getPluginLocalizedValue(String)}
- * @param keepAmpersands
- * if <code>true</code>, ampersands will be kept
- * @return see {@link #getPluginLocalizedValue(String)}
- * @throws MissingResourceException
- * see {@link #getPluginLocalizedValue(String)}
- */
- public synchronized String getPluginLocalizedValue(String key,
- boolean keepAmpersands) throws MissingResourceException {
- if (myBundle == null) {
- ServiceTracker localizationTracker;
-
- BundleContext context = Activator.getDefault().getBundle()
- .getBundleContext();
-
- localizationTracker = new ServiceTracker(context,
- BundleLocalization.class.getName(), null);
- localizationTracker.open();
-
- BundleLocalization location = (BundleLocalization) localizationTracker
- .getService();
- if (location != null)
- myBundle = location.getLocalization(Activator.getDefault()
- .getBundle(), Locale.getDefault().toString());
- }
-
- String raw = myBundle.getString(key);
-
- if (keepAmpersands || raw.indexOf(AMPERSAND) < 0)
- return raw;
-
- StringBuilder sb = new StringBuilder(raw.length());
- for (int i = 0; i < raw.length(); i++) {
- char c = raw.charAt(i);
- if (c != AMPERSAND)
- sb.append(c);
- }
- return sb.toString();
- }
-}
+/*******************************************************************************
+ * 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.ui.test;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.egit.ui.Activator;
+import org.eclipse.osgi.service.localization.BundleLocalization;
+import org.osgi.framework.BundleContext;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Utilities to be used by SWTBot tests
+ */
+public class TestUtil {
+
+ private static final char AMPERSAND = '&';
+
+ private static final TestUtil INSTANCE = new TestUtil();
+
+ public static TestUtil getInstance() {
+ return INSTANCE;
+ }
+
+ private ResourceBundle myBundle;
+
+ /**
+ * Allows access to the localized values of the EGit UI Plug-in
+ * <p>
+ * This will effectively read the plugin.properties. Ampersands (often used
+ * in menu items and field labels for keyboard shortcuts) will be filtered
+ * out (see also {@link #getPluginLocalizedValue(String, boolean)} in order
+ * to be able to reference these fields using SWTBot).
+ *
+ * @param key
+ * the key, must not be null
+ * @return the localized value in the current default {@link Locale}, or
+ * null
+ * @throws MissingResourceException
+ * if no value is found for the given key
+ */
+ public synchronized String getPluginLocalizedValue(String key)
+ throws MissingResourceException {
+ return getPluginLocalizedValue(key, false);
+ }
+
+ /**
+ * Allows access to the localized values of the EGit UI Plug-in
+ * <p>
+ *
+ * @param key
+ * see {@link #getPluginLocalizedValue(String)}
+ * @param keepAmpersands
+ * if <code>true</code>, ampersands will be kept
+ * @return see {@link #getPluginLocalizedValue(String)}
+ * @throws MissingResourceException
+ * see {@link #getPluginLocalizedValue(String)}
+ */
+ public synchronized String getPluginLocalizedValue(String key,
+ boolean keepAmpersands) throws MissingResourceException {
+ if (myBundle == null) {
+ ServiceTracker localizationTracker;
+
+ BundleContext context = Activator.getDefault().getBundle()
+ .getBundleContext();
+
+ localizationTracker = new ServiceTracker(context,
+ BundleLocalization.class.getName(), null);
+ localizationTracker.open();
+
+ BundleLocalization location = (BundleLocalization) localizationTracker
+ .getService();
+ if (location != null)
+ myBundle = location.getLocalization(Activator.getDefault()
+ .getBundle(), Locale.getDefault().toString());
+ }
+
+ String raw = myBundle.getString(key);
+
+ if (keepAmpersands || raw.indexOf(AMPERSAND) < 0)
+ return raw;
+
+ StringBuilder sb = new StringBuilder(raw.length());
+ for (int i = 0; i < raw.length(); i++) {
+ char c = raw.charAt(i);
+ if (c != AMPERSAND)
+ sb.append(c);
+ }
+ return sb.toString();
+ }
+}
diff --git a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
index 552336980..904ca44e4 100644
--- a/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
+++ b/org.eclipse.egit.ui.test/src/org/eclipse/egit/ui/view/repositories/GitRepositoriesViewTest.java
@@ -1,243 +1,243 @@
-/*******************************************************************************
- * 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.ui.view.repositories;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.egit.core.op.ConnectProviderOperation;
-import org.eclipse.egit.ui.Activator;
-import org.eclipse.egit.ui.UIText;
-import org.eclipse.egit.ui.test.ContextMenuHelper;
-import org.eclipse.egit.ui.test.TestUtil;
-import org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest;
-import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.lib.RepositoryCache.FileKey;
-import org.eclipse.jgit.util.FS;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
-import org.eclipse.swtbot.swt.finder.utils.TableCollection;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
-import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * SWTBot Tests for the Git Repositories View
- */
-@RunWith(SWTBotJunit4ClassRunner.class)
-public class GitRepositoriesViewTest {
-
- private static final String PRJ_NAME = "ImportProjectsTest";
-
- private static final SWTWorkbenchBot bot = new SWTWorkbenchBot();
-
- private SWTBotView viewbot;
-
- private static IProject myProject;
-
- private final static TestUtil myUtil = TestUtil.getInstance();
-
- private static String viewName;
-
- private static String gitCategory;
-
- @BeforeClass
- public static void beforeClass() throws Exception {
- // the show in context menu does not appear in the project explorer for
- // general projects
- bot.perspectiveById("org.eclipse.pde.ui.PDEPerspective").activate();
- GitCloneWizardTest.closeWelcomePage();
- myProject = ResourcesPlugin.getWorkspace().getRoot().getProject(
- PRJ_NAME);
- if (myProject.exists())
- myProject.delete(true, null);
- myProject.create(null);
- myProject.open(null);
-
- IFolder folder = myProject.getFolder("folder");
- folder.create(false, true, null);
- folder.getFile("test.txt").create(
- new ByteArrayInputStream("Hello, world".getBytes("UTF-8")),
- false, null);
-
- File dirFile = myProject.getLocation().append(".git").toFile();
- Repository repo = new Repository(dirFile);
- repo.create();
-
- new ConnectProviderOperation(myProject, dirFile).execute(null);
- Activator.getDefault().getRepositoryUtil().addConfiguredRepository(
- dirFile);
-
- viewName = myUtil.getPluginLocalizedValue("GitRepositoriesView_name");
- gitCategory = myUtil.getPluginLocalizedValue("GitCategory_name");
- }
-
- @AfterClass
- public static void afterClass() throws Exception {
- myProject.delete(true, null);
- }
-
- @Test
- public void testOpenView() throws Exception {
- getOrOpenView();
- }
-
- @Test
- @Ignore
- // TODO currently, this does not work if a refresh is currently running ->
- // fix RepositoriesView
- public void testShowIn() throws Exception {
- SWTBotTree tree = bot.viewById("org.eclipse.jdt.ui.PackageExplorer")
- .bot().tree();
- tree.getAllItems()[0].select();
- ContextMenuHelper.clickContextMenu(tree, "Show In", viewName);
-
- SWTBotTree viewerTree = getOrOpenView().bot().tree();
-
- TableCollection selection = viewerTree.selection();
- assertTrue("Selection should contain one eelement", selection
- .rowCount() == 1);
- String nodeText = selection.get(0).get(0);
- assertTrue("Node text should contain project name", nodeText
- .contains(myProject.getName()));
-
- tree.select(tree.getAllItems()[0].expand().getNode("folder").expand()
- .getNode("test.txt"));
-
- ContextMenuHelper.clickContextMenu(tree, "Show In", viewName);
-
- selection = viewerTree.selection();
- assertTrue("Selection should contain one eelement", selection
- .rowCount() == 1);
- nodeText = selection.get(0).get(0);
- assertTrue("Node text should contain file name", nodeText
- .contains("test.txt"));
- }
-
- @Test
- @Ignore
- // TODO this consistently fails with a "Widget disposed" SWT Exception
- // if run in the AllTests test suite, but consistently works
- // if this test class is run alone -> investigate
- public void testOpenFirstLevel() throws Exception {
- final SWTBotView view = getOrOpenView();
- final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
- items[0].expand();
- SWTBotTreeItem[] children;
-
- children = items[0].getItems();
- assertEquals("Wrong number of children", 5, children.length);
- }
-
- @Test
- public void testHasRepo() throws Exception {
- final SWTBotView view = getOrOpenView();
- final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
- boolean found = false;
- for (SWTBotTreeItem item : items) {
- if (item.getText().startsWith(PRJ_NAME)) {
- found = true;
- break;
- }
- }
- assertTrue("Tree should have item with correct text", found);
- }
-
- @Test
- public void testCopyPathToClipboard() throws Exception {
- final SWTBotView view = getOrOpenView();
- final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
- items[0].select();
- Display.getDefault().syncExec(new Runnable() {
-
- public void run() {
- Clipboard clp = new Clipboard(Display.getCurrent());
- clp.clearContents();
- clp.setContents(new Object[] { "x" },
- new TextTransfer[] { TextTransfer.getInstance() });
- String value = (String) clp.getContents(TextTransfer
- .getInstance());
- assertEquals("Clipboard content should be x", "x", value);
-
- ContextMenuHelper.clickContextMenu(view.bot().tree(), myUtil
- .getPluginLocalizedValue("CopyPathCommand"));
-
- value = (String) clp.getContents(TextTransfer.getInstance());
- assertTrue("Clipboard content should be a repository path",
- FileKey.isGitRepository(new File(value), FS.DETECTED));
-
- clp.dispose();
- }
- });
-
- }
-
- @Test
- public void testAddRepoButton() throws Exception {
- getOrOpenView().toolbarButton(
- myUtil.getPluginLocalizedValue("AddRepositoryCommand")).click();
- SWTBotShell shell = bot.shell(
- UIText.RepositorySearchDialog_AddGitRepositories).activate();
- shell.close();
- }
-
- @Test
- public void testCloneRepoButton() throws Exception {
- getOrOpenView().toolbarButton(
- myUtil.getPluginLocalizedValue("CloneRepositoryCommand"))
- .click();
- SWTBotShell shell = bot.shell(UIText.GitCloneWizard_title).activate();
- shell.close();
- }
-
- private SWTBotView getOrOpenView() throws Exception {
- if (viewbot == null) {
- bot.menu("Window").menu("Show View").menu("Other...").click();
- SWTBotShell shell = bot.shell("Show View").activate();
- shell.bot().tree().expandNode(gitCategory).getNode(viewName)
- .select();
- shell.bot().button(0).click();
-
- viewbot = bot.viewByTitle(viewName);
-
- assertNotNull("Repositories View should not be null", viewbot);
- }
- return viewbot;
- }
-
- @Test
- @Ignore
- public void testLinkWithSelection() throws Exception {
- // TODO implement
- }
-
- @Test
- @Ignore
- public void testCollapseAll() throws Exception {
- // TODO implement
- }
-}
+/*******************************************************************************
+ * 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.ui.view.repositories;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+
+import org.eclipse.core.resources.IFolder;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.egit.core.op.ConnectProviderOperation;
+import org.eclipse.egit.ui.Activator;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.test.ContextMenuHelper;
+import org.eclipse.egit.ui.test.TestUtil;
+import org.eclipse.egit.ui.wizards.clone.GitCloneWizardTest;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.lib.RepositoryCache.FileKey;
+import org.eclipse.jgit.util.FS;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
+import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.utils.TableCollection;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * SWTBot Tests for the Git Repositories View
+ */
+@RunWith(SWTBotJunit4ClassRunner.class)
+public class GitRepositoriesViewTest {
+
+ private static final String PRJ_NAME = "ImportProjectsTest";
+
+ private static final SWTWorkbenchBot bot = new SWTWorkbenchBot();
+
+ private SWTBotView viewbot;
+
+ private static IProject myProject;
+
+ private final static TestUtil myUtil = TestUtil.getInstance();
+
+ private static String viewName;
+
+ private static String gitCategory;
+
+ @BeforeClass
+ public static void beforeClass() throws Exception {
+ // the show in context menu does not appear in the project explorer for
+ // general projects
+ bot.perspectiveById("org.eclipse.pde.ui.PDEPerspective").activate();
+ GitCloneWizardTest.closeWelcomePage();
+ myProject = ResourcesPlugin.getWorkspace().getRoot().getProject(
+ PRJ_NAME);
+ if (myProject.exists())
+ myProject.delete(true, null);
+ myProject.create(null);
+ myProject.open(null);
+
+ IFolder folder = myProject.getFolder("folder");
+ folder.create(false, true, null);
+ folder.getFile("test.txt").create(
+ new ByteArrayInputStream("Hello, world".getBytes("UTF-8")),
+ false, null);
+
+ File dirFile = myProject.getLocation().append(".git").toFile();
+ Repository repo = new Repository(dirFile);
+ repo.create();
+
+ new ConnectProviderOperation(myProject, dirFile).execute(null);
+ Activator.getDefault().getRepositoryUtil().addConfiguredRepository(
+ dirFile);
+
+ viewName = myUtil.getPluginLocalizedValue("GitRepositoriesView_name");
+ gitCategory = myUtil.getPluginLocalizedValue("GitCategory_name");
+ }
+
+ @AfterClass
+ public static void afterClass() throws Exception {
+ myProject.delete(true, null);
+ }
+
+ @Test
+ public void testOpenView() throws Exception {
+ getOrOpenView();
+ }
+
+ @Test
+ @Ignore
+ // TODO currently, this does not work if a refresh is currently running ->
+ // fix RepositoriesView
+ public void testShowIn() throws Exception {
+ SWTBotTree tree = bot.viewById("org.eclipse.jdt.ui.PackageExplorer")
+ .bot().tree();
+ tree.getAllItems()[0].select();
+ ContextMenuHelper.clickContextMenu(tree, "Show In", viewName);
+
+ SWTBotTree viewerTree = getOrOpenView().bot().tree();
+
+ TableCollection selection = viewerTree.selection();
+ assertTrue("Selection should contain one eelement", selection
+ .rowCount() == 1);
+ String nodeText = selection.get(0).get(0);
+ assertTrue("Node text should contain project name", nodeText
+ .contains(myProject.getName()));
+
+ tree.select(tree.getAllItems()[0].expand().getNode("folder").expand()
+ .getNode("test.txt"));
+
+ ContextMenuHelper.clickContextMenu(tree, "Show In", viewName);
+
+ selection = viewerTree.selection();
+ assertTrue("Selection should contain one eelement", selection
+ .rowCount() == 1);
+ nodeText = selection.get(0).get(0);
+ assertTrue("Node text should contain file name", nodeText
+ .contains("test.txt"));
+ }
+
+ @Test
+ @Ignore
+ // TODO this consistently fails with a "Widget disposed" SWT Exception
+ // if run in the AllTests test suite, but consistently works
+ // if this test class is run alone -> investigate
+ public void testOpenFirstLevel() throws Exception {
+ final SWTBotView view = getOrOpenView();
+ final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
+ items[0].expand();
+ SWTBotTreeItem[] children;
+
+ children = items[0].getItems();
+ assertEquals("Wrong number of children", 5, children.length);
+ }
+
+ @Test
+ public void testHasRepo() throws Exception {
+ final SWTBotView view = getOrOpenView();
+ final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
+ boolean found = false;
+ for (SWTBotTreeItem item : items) {
+ if (item.getText().startsWith(PRJ_NAME)) {
+ found = true;
+ break;
+ }
+ }
+ assertTrue("Tree should have item with correct text", found);
+ }
+
+ @Test
+ public void testCopyPathToClipboard() throws Exception {
+ final SWTBotView view = getOrOpenView();
+ final SWTBotTreeItem[] items = view.bot().tree().getAllItems();
+ items[0].select();
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ Clipboard clp = new Clipboard(Display.getCurrent());
+ clp.clearContents();
+ clp.setContents(new Object[] { "x" },
+ new TextTransfer[] { TextTransfer.getInstance() });
+ String value = (String) clp.getContents(TextTransfer
+ .getInstance());
+ assertEquals("Clipboard content should be x", "x", value);
+
+ ContextMenuHelper.clickContextMenu(view.bot().tree(), myUtil
+ .getPluginLocalizedValue("CopyPathCommand"));
+
+ value = (String) clp.getContents(TextTransfer.getInstance());
+ assertTrue("Clipboard content should be a repository path",
+ FileKey.isGitRepository(new File(value), FS.DETECTED));
+
+ clp.dispose();
+ }
+ });
+
+ }
+
+ @Test
+ public void testAddRepoButton() throws Exception {
+ getOrOpenView().toolbarButton(
+ myUtil.getPluginLocalizedValue("AddRepositoryCommand")).click();
+ SWTBotShell shell = bot.shell(
+ UIText.RepositorySearchDialog_AddGitRepositories).activate();
+ shell.close();
+ }
+
+ @Test
+ public void testCloneRepoButton() throws Exception {
+ getOrOpenView().toolbarButton(
+ myUtil.getPluginLocalizedValue("CloneRepositoryCommand"))
+ .click();
+ SWTBotShell shell = bot.shell(UIText.GitCloneWizard_title).activate();
+ shell.close();
+ }
+
+ private SWTBotView getOrOpenView() throws Exception {
+ if (viewbot == null) {
+ bot.menu("Window").menu("Show View").menu("Other...").click();
+ SWTBotShell shell = bot.shell("Show View").activate();
+ shell.bot().tree().expandNode(gitCategory).getNode(viewName)
+ .select();
+ shell.bot().button(0).click();
+
+ viewbot = bot.viewByTitle(viewName);
+
+ assertNotNull("Repositories View should not be null", viewbot);
+ }
+ return viewbot;
+ }
+
+ @Test
+ @Ignore
+ public void testLinkWithSelection() throws Exception {
+ // TODO implement
+ }
+
+ @Test
+ @Ignore
+ public void testCollapseAll() throws Exception {
+ // TODO implement
+ }
+}
diff --git a/org.eclipse.egit.ui/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit.ui/.settings/org.eclipse.core.runtime.prefs
index d1478c619..bc500db31 100644
--- a/org.eclipse.egit.ui/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit.ui/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:54:29 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:54:29 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egit.ui/.settings/org.eclipse.jdt.core.prefs
index acbf20712..f739ced64 100644
--- a/org.eclipse.egit.ui/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.egit.ui/.settings/org.eclipse.jdt.core.prefs
@@ -1,358 +1,358 @@
-#Wed May 05 01:28:48 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=warning
-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=warning
-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_annotation=0
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
-org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_assignment=0
-org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
-org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
-org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
-org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
-org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
-org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
-org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
-org.eclipse.jdt.core.formatter.alignment_for_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.comment.new_lines_at_block_boundaries=true
-org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
-org.eclipse.jdt.core.formatter.compact_else_if=true
-org.eclipse.jdt.core.formatter.continuation_indentation=2
-org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
-org.eclipse.jdt.core.formatter.disabling_tag=
-org.eclipse.jdt.core.formatter.enabling_tag=
-org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
-org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
-org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
-org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_empty_lines=false
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
-org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
-org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
-org.eclipse.jdt.core.formatter.indentation.size=4
-org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=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_label=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
-org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
-org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
-org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
-org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
-org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
-org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
-org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
-org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_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.join_lines_in_comments=true
-org.eclipse.jdt.core.formatter.join_wrapped_lines=true
-org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
-org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
-org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
-org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
-org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
-org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
-org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+#Wed May 05 01:28:48 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=warning
+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=warning
+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_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_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.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=
+org.eclipse.jdt.core.formatter.enabling_tag=
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=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_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_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.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
index d566b81e4..f2d8359d1 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/history/CommitFileDiffViewer.java
@@ -1,148 +1,148 @@
-/*******************************************************************************
- * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
- *
- * 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
- *******************************************************************************/
-package org.eclipse.egit.ui.internal.history;
-
-import java.util.Iterator;
-
-import org.eclipse.compare.CompareUI;
-import org.eclipse.compare.ITypedElement;
-import org.eclipse.egit.ui.UIText;
-import org.eclipse.egit.ui.internal.CompareUtils;
-import org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput;
-import org.eclipse.jface.viewers.ColumnWeightData;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelection;
-import org.eclipse.jface.viewers.IStructuredContentProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.viewers.TableLayout;
-import org.eclipse.jface.viewers.TableViewer;
-import org.eclipse.jgit.lib.Repository;
-import org.eclipse.jgit.revwalk.RevCommit;
-import org.eclipse.jgit.treewalk.TreeWalk;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.dnd.DND;
-import org.eclipse.swt.dnd.TextTransfer;
-import org.eclipse.swt.dnd.Transfer;
-import org.eclipse.swt.events.DisposeEvent;
-import org.eclipse.swt.events.DisposeListener;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Table;
-import org.eclipse.swt.widgets.TableColumn;
-
-class CommitFileDiffViewer extends TableViewer {
- private TreeWalk walker;
-
- private Clipboard clipboard;
-
- CommitFileDiffViewer(final Composite parent) {
- super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER
- | SWT.FULL_SELECTION);
-
- final Table rawTable = getTable();
- rawTable.setHeaderVisible(true);
- rawTable.setLinesVisible(true);
-
- final TableLayout layout = new TableLayout();
- rawTable.setLayout(layout);
- createColumns(rawTable, layout);
-
- setLabelProvider(new FileDiffLabelProvider());
- setContentProvider(new FileDiffContentProvider());
- addOpenListener(new IOpenListener() {
- public void open(final OpenEvent event) {
- final ISelection s = event.getSelection();
- if (s.isEmpty() || !(s instanceof IStructuredSelection))
- return;
- final IStructuredSelection iss = (IStructuredSelection) s;
- final FileDiff d = (FileDiff) iss.getFirstElement();
- if (walker != null && d.blobs.length == 2)
- showTwoWayFileDiff(d);
- }
- });
-
- clipboard = new Clipboard(rawTable.getDisplay());
- rawTable.addDisposeListener(new DisposeListener() {
- public void widgetDisposed(final DisposeEvent e) {
- clipboard.dispose();
- }
- });
- }
-
- void showTwoWayFileDiff(final FileDiff d) {
- final GitCompareFileRevisionEditorInput in;
-
- final Repository db = walker.getRepository();
- final String p = d.path;
- final RevCommit c = d.commit;
- final ITypedElement base;
- final ITypedElement next;
-
- base = CompareUtils.getFileRevisionTypedElement(p, c.getParent(0), db, d.blobs[0]);
- next = CompareUtils.getFileRevisionTypedElement(p, c, db, d.blobs[1]);
-
- in = new GitCompareFileRevisionEditorInput(base, next, null);
- CompareUI.openCompareEditor(in);
- }
-
- TreeWalk getTreeWalk() {
- return walker;
- }
-
- void setTreeWalk(final TreeWalk walk) {
- walker = walk;
- }
-
- void doSelectAll() {
- final IStructuredContentProvider cp;
- final Object in = getInput();
- if (in == null)
- return;
-
- cp = ((IStructuredContentProvider) getContentProvider());
- final Object[] el = cp.getElements(in);
- if (el == null || el.length == 0)
- return;
- setSelection(new StructuredSelection(el));
- }
-
- void doCopy() {
- final ISelection s = getSelection();
- if (s.isEmpty() || !(s instanceof IStructuredSelection))
- return;
- final IStructuredSelection iss = (IStructuredSelection) s;
- final Iterator<FileDiff> itr = iss.iterator();
- final StringBuilder r = new StringBuilder();
- while (itr.hasNext()) {
- final FileDiff d = itr.next();
- if (r.length() > 0)
- r.append("\n"); //$NON-NLS-1$
- r.append(d.path);
- }
-
- clipboard.setContents(new Object[] { r.toString() },
- new Transfer[] { TextTransfer.getInstance() }, DND.CLIPBOARD);
- }
-
- private void createColumns(final Table rawTable, final TableLayout layout) {
- final TableColumn mode = new TableColumn(rawTable, SWT.NONE);
- mode.setResizable(true);
- mode.setText(""); //$NON-NLS-1$
- mode.setWidth(5);
- layout.addColumnData(new ColumnWeightData(1, true));
-
- final TableColumn path = new TableColumn(rawTable, SWT.NONE);
- path.setResizable(true);
- path.setText(UIText.HistoryPage_pathnameColumn);
- path.setWidth(250);
- layout.addColumnData(new ColumnWeightData(20, true));
- }
-}
+/*******************************************************************************
+ * Copyright (C) 2008, Shawn O. Pearce <spearce@spearce.org>
+ *
+ * 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
+ *******************************************************************************/
+package org.eclipse.egit.ui.internal.history;
+
+import java.util.Iterator;
+
+import org.eclipse.compare.CompareUI;
+import org.eclipse.compare.ITypedElement;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.egit.ui.internal.CompareUtils;
+import org.eclipse.egit.ui.internal.GitCompareFileRevisionEditorInput;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.IOpenListener;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.OpenEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.revwalk.RevCommit;
+import org.eclipse.jgit.treewalk.TreeWalk;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.DND;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.dnd.Transfer;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.swt.widgets.TableColumn;
+
+class CommitFileDiffViewer extends TableViewer {
+ private TreeWalk walker;
+
+ private Clipboard clipboard;
+
+ CommitFileDiffViewer(final Composite parent) {
+ super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER
+ | SWT.FULL_SELECTION);
+
+ final Table rawTable = getTable();
+ rawTable.setHeaderVisible(true);
+ rawTable.setLinesVisible(true);
+
+ final TableLayout layout = new TableLayout();
+ rawTable.setLayout(layout);
+ createColumns(rawTable, layout);
+
+ setLabelProvider(new FileDiffLabelProvider());
+ setContentProvider(new FileDiffContentProvider());
+ addOpenListener(new IOpenListener() {
+ public void open(final OpenEvent event) {
+ final ISelection s = event.getSelection();
+ if (s.isEmpty() || !(s instanceof IStructuredSelection))
+ return;
+ final IStructuredSelection iss = (IStructuredSelection) s;
+ final FileDiff d = (FileDiff) iss.getFirstElement();
+ if (walker != null && d.blobs.length == 2)
+ showTwoWayFileDiff(d);
+ }
+ });
+
+ clipboard = new Clipboard(rawTable.getDisplay());
+ rawTable.addDisposeListener(new DisposeListener() {
+ public void widgetDisposed(final DisposeEvent e) {
+ clipboard.dispose();
+ }
+ });
+ }
+
+ void showTwoWayFileDiff(final FileDiff d) {
+ final GitCompareFileRevisionEditorInput in;
+
+ final Repository db = walker.getRepository();
+ final String p = d.path;
+ final RevCommit c = d.commit;
+ final ITypedElement base;
+ final ITypedElement next;
+
+ base = CompareUtils.getFileRevisionTypedElement(p, c.getParent(0), db, d.blobs[0]);
+ next = CompareUtils.getFileRevisionTypedElement(p, c, db, d.blobs[1]);
+
+ in = new GitCompareFileRevisionEditorInput(base, next, null);
+ CompareUI.openCompareEditor(in);
+ }
+
+ TreeWalk getTreeWalk() {
+ return walker;
+ }
+
+ void setTreeWalk(final TreeWalk walk) {
+ walker = walk;
+ }
+
+ void doSelectAll() {
+ final IStructuredContentProvider cp;
+ final Object in = getInput();
+ if (in == null)
+ return;
+
+ cp = ((IStructuredContentProvider) getContentProvider());
+ final Object[] el = cp.getElements(in);
+ if (el == null || el.length == 0)
+ return;
+ setSelection(new StructuredSelection(el));
+ }
+
+ void doCopy() {
+ final ISelection s = getSelection();
+ if (s.isEmpty() || !(s instanceof IStructuredSelection))
+ return;
+ final IStructuredSelection iss = (IStructuredSelection) s;
+ final Iterator<FileDiff> itr = iss.iterator();
+ final StringBuilder r = new StringBuilder();
+ while (itr.hasNext()) {
+ final FileDiff d = itr.next();
+ if (r.length() > 0)
+ r.append("\n"); //$NON-NLS-1$
+ r.append(d.path);
+ }
+
+ clipboard.setContents(new Object[] { r.toString() },
+ new Transfer[] { TextTransfer.getInstance() }, DND.CLIPBOARD);
+ }
+
+ private void createColumns(final Table rawTable, final TableLayout layout) {
+ final TableColumn mode = new TableColumn(rawTable, SWT.NONE);
+ mode.setResizable(true);
+ mode.setText(""); //$NON-NLS-1$
+ mode.setWidth(5);
+ layout.addColumnData(new ColumnWeightData(1, true));
+
+ final TableColumn path = new TableColumn(rawTable, SWT.NONE);
+ path.setResizable(true);
+ path.setText(UIText.HistoryPage_pathnameColumn);
+ path.setWidth(250);
+ layout.addColumnData(new ColumnWeightData(20, true));
+ }
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitSynchronizeWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitSynchronizeWizard.java
index 64b3ebf13..a7db49e39 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitSynchronizeWizard.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/synchronize/GitSynchronizeWizard.java
@@ -1,61 +1,61 @@
-/*******************************************************************************
- * 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
* Dariusz Luksza <dariusz@luksza.org>
- *******************************************************************************/
-package org.eclipse.egit.ui.internal.synchronize;
-
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.resources.IProject;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeData;
-import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
-import org.eclipse.egit.ui.UIText;
-import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.jgit.lib.Constants;
-import org.eclipse.jgit.lib.Repository;
-
+ *******************************************************************************/
+package org.eclipse.egit.ui.internal.synchronize;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeData;
+import org.eclipse.egit.core.synchronize.dto.GitSynchronizeDataSet;
+import org.eclipse.egit.ui.UIText;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.jgit.lib.Constants;
+import org.eclipse.jgit.lib.Repository;
+
/**
* Synchronization wizard for Git repositories
- */
-public class GitSynchronizeWizard extends Wizard {
-
- private GitSynchronizeWizardPage page;
-
- /**
- * Instantiates a new wizard for synchronizing resources that are being
- * managed by EGit.
- */
- public GitSynchronizeWizard() {
- setWindowTitle(UIText.GitSynchronizeWizard_synchronize);
- }
-
- @Override
- public void addPages() {
- page = new GitSynchronizeWizardPage();
- addPage(page);
- }
-
- @Override
- public boolean performFinish() {
- Set<IProject> projects = page.getSelectedProjects();
- GitSynchronizeDataSet gsdSet = new GitSynchronizeDataSet();
-
- Map<Repository, String> branches = page.getSelectedBranches();
- for (Repository repo : branches.keySet()) {
- gsdSet.add(new GitSynchronizeData(repo, Constants.HEAD, branches.get(repo), projects, false));
- }
-
- new GitSynchronize(gsdSet);
-
- return true;
- }
-
-}
+ */
+public class GitSynchronizeWizard extends Wizard {
+
+ private GitSynchronizeWizardPage page;
+
+ /**
+ * Instantiates a new wizard for synchronizing resources that are being
+ * managed by EGit.
+ */
+ public GitSynchronizeWizard() {
+ setWindowTitle(UIText.GitSynchronizeWizard_synchronize);
+ }
+
+ @Override
+ public void addPages() {
+ page = new GitSynchronizeWizardPage();
+ addPage(page);
+ }
+
+ @Override
+ public boolean performFinish() {
+ Set<IProject> projects = page.getSelectedProjects();
+ GitSynchronizeDataSet gsdSet = new GitSynchronizeDataSet();
+
+ Map<Repository, String> branches = page.getSelectedBranches();
+ for (Repository repo : branches.keySet()) {
+ gsdSet.add(new GitSynchronizeData(repo, Constants.HEAD, branches.get(repo), projects, false));
+ }
+
+ new GitSynchronize(gsdSet);
+
+ return true;
+ }
+
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/GitTraceLocation.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/GitTraceLocation.java
index 40682ac67..931afedd4 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/GitTraceLocation.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/GitTraceLocation.java
@@ -1,145 +1,145 @@
-/*******************************************************************************
- * 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.ui.internal.trace;
-
-import org.eclipse.core.runtime.ILog;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.egit.ui.Activator;
-import org.eclipse.osgi.service.debug.DebugOptions;
-
-/**
- * EGit Trace locations
- */
-public enum GitTraceLocation implements ITraceLocation {
-
- /** UI */
- UI("/debug/ui"); //$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()));
-
- }
-
- public void traceEntry(String location) {
- // not implemented
- }
-
- public void traceEntry(String location, String message) {
- // not implemented
- }
-
- 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.ui.internal.trace;
+
+import org.eclipse.core.runtime.ILog;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.egit.ui.Activator;
+import org.eclipse.osgi.service.debug.DebugOptions;
+
+/**
+ * EGit Trace locations
+ */
+public enum GitTraceLocation implements ITraceLocation {
+
+ /** UI */
+ UI("/debug/ui"); //$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()));
+
+ }
+
+ public void traceEntry(String location) {
+ // not implemented
+ }
+
+ public void traceEntry(String location, String message) {
+ // not implemented
+ }
+
+ private ILog getLog() {
+ if (myLog == null) {
+ myLog = Activator.getDefault().getLog();
+ }
+ return myLog;
+ }
+
+ }
+
+}
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/ITraceLocation.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/ITraceLocation.java
index 430166849..1be3174e5 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/ITraceLocation.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/trace/ITraceLocation.java
@@ -1,30 +1,30 @@
-/*******************************************************************************
- * 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.ui.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.ui.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/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.egit/.settings/org.eclipse.core.runtime.prefs
index 3e3cb2664..1159a36cb 100644
--- a/org.eclipse.egit/.settings/org.eclipse.core.runtime.prefs
+++ b/org.eclipse.egit/.settings/org.eclipse.core.runtime.prefs
@@ -1,3 +1,3 @@
-#Mon Mar 24 18:55:20 EDT 2008
-eclipse.preferences.version=1
-line.separator=\n
+#Mon Mar 24 18:55:20 EDT 2008
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.egit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.egit/.settings/org.eclipse.jdt.core.prefs
index 8ffdd6a35..b2b633990 100644
--- a/org.eclipse.egit/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.egit/.settings/org.eclipse.jdt.core.prefs
@@ -1,7 +1,7 @@
-#Wed Mar 26 23:29:20 EDT 2008
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+#Wed Mar 26 23:29:20 EDT 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5

Back to the top