summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteffen Pingel2013-04-15 09:57:55 (EDT)
committerSteffen Pingel2013-04-15 20:06:09 (EDT)
commita0fad711183c44b82edcb5df816856beaddf5079 (patch)
treeefab01ddbfb5a3e9a7a730ef6c73578b87c5f51e
parentdab45ebad385f4ee7320c58a7462995eafe6af35 (diff)
downloadorg.eclipse.mylyn.tasks-a0fad711183c44b82edcb5df816856beaddf5079.zip
org.eclipse.mylyn.tasks-a0fad711183c44b82edcb5df816856beaddf5079.tar.gz
org.eclipse.mylyn.tasks-a0fad711183c44b82edcb5df816856beaddf5079.tar.bz2
400396: fix additional Trac fixture test failuresrefs/changes/00/11900/3
* Handle empty value when parsing tickets on 1.0 in web mode. * Ensure correct token is submitted for form based authentication. * Exclude tests that don't apply in specialized fixtures. Change-Id: Idc7ae6934a3a6a590fd867f995a69d537690bb28 Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=400396
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.classpath7
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.project34
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.core.runtime.prefs2
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.core.prefs396
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.ui.prefs62
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.team.ui.prefs2
-rw-r--r--org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.trac.core.tests/META-INF/MANIFEST.MF13
-rw-r--r--org.eclipse.mylyn.trac.core.tests/about.html27
-rw-r--r--org.eclipse.mylyn.trac.core.tests/build.properties6
-rw-r--r--org.eclipse.mylyn.trac.core.tests/pom.xml22
-rw-r--r--org.eclipse.mylyn.trac.core.tests/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParserTest.java61
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java15
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java64
-rw-r--r--org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParser.java107
-rw-r--r--org.eclipse.mylyn.trac.tests/.gitignore1
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java35
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java27
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java7
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java6
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java95
-rw-r--r--org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java12
-rw-r--r--pom.xml1
25 files changed, 908 insertions, 119 deletions
diff --git a/org.eclipse.mylyn.trac.core.tests/.classpath b/org.eclipse.mylyn.trac.core.tests/.classpath
new file mode 100644
index 0000000..ad32c83
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/org.eclipse.mylyn.trac.core.tests/.project b/org.eclipse.mylyn.trac.core.tests/.project
new file mode 100644
index 0000000..a65c5ec
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.project
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.mylyn.trac.core.tests</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+</projectDescription>
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.core.runtime.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.core.runtime.prefs
new file mode 100644
index 0000000..5a0ad22
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.core.runtime.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+line.separator=\n
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..34746cc
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,396 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.codeComplete.argumentPrefixes=
+org.eclipse.jdt.core.codeComplete.argumentSuffixes=
+org.eclipse.jdt.core.codeComplete.fieldPrefixes=
+org.eclipse.jdt.core.codeComplete.fieldSuffixes=
+org.eclipse.jdt.core.codeComplete.localPrefixes=
+org.eclipse.jdt.core.codeComplete.localSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
+org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=error
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+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=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
+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=48
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=80
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=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=true
+org.eclipse.jdt.core.formatter.comment.format_block_comments=false
+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=false
+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=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_member=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_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_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=true
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..7fc20b8
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,62 @@
+cleanup_settings_version=2
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+formatter_profile=_Mylyn based on Eclipse
+formatter_settings_version=12
+internal.default.compliance=default
+org.eclipse.jdt.ui.exception.name=e
+org.eclipse.jdt.ui.gettersetter.use.is=true
+org.eclipse.jdt.ui.javadoc=false
+org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.overrideannotation=true
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment"/><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*******************************************************************************\n * Copyright (c) ${year} Tasktop Technologies and others.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Tasktop Technologies - initial API and implementation\n *******************************************************************************/\n\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="false" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ignore\n${body_statement}</template><template autoinsert\="false" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ignore</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=true
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=true
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
new file mode 100644
index 0000000..5e7f2bd
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.ltk.core.refactoring.prefs
@@ -0,0 +1,3 @@
+#Tue Aug 18 22:42:26 PDT 2009
+eclipse.preferences.version=1
+org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
new file mode 100644
index 0000000..d8c6d26
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Jun 25 03:02:37 GMT 2007
+eclipse.preferences.version=1
+project.repository.kind=bugzilla
+project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.team.ui.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.team.ui.prefs
new file mode 100644
index 0000000..10d0afb
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.mylyn.team.ui.prefs
@@ -0,0 +1,2 @@
+commit.comment.template=${task.key}\: ${task.description}\n\nTask-Url\: ${task.url}
+eclipse.preferences.version=1
diff --git a/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.pde.prefs
new file mode 100644
index 0000000..e8f2d56
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/.settings/org.eclipse.pde.prefs
@@ -0,0 +1,18 @@
+#Tue Apr 15 11:07:59 PDT 2008
+compilers.incompatible-environment=1
+compilers.p.build=1
+compilers.p.deprecated=1
+compilers.p.discouraged-class=2
+compilers.p.missing-bundle-classpath-entries=1
+compilers.p.missing-packages=1
+compilers.p.no-required-att=0
+compilers.p.not-externalized-att=2
+compilers.p.unknown-attribute=0
+compilers.p.unknown-class=0
+compilers.p.unknown-element=0
+compilers.p.unknown-identifier=1
+compilers.p.unknown-resource=0
+compilers.p.unresolved-ex-points=0
+compilers.p.unresolved-import=0
+compilers.use-project=true
+eclipse.preferences.version=1
diff --git a/org.eclipse.mylyn.trac.core.tests/META-INF/MANIFEST.MF b/org.eclipse.mylyn.trac.core.tests/META-INF/MANIFEST.MF
new file mode 100644
index 0000000..c2437c3
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,13 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Mylyn Trac Tests
+Bundle-SymbolicName: org.eclipse.mylyn.trac.core.tests;singleton:=true
+Bundle-Version: 3.9.0.qualifier
+Bundle-Vendor: Eclipse Mylyn
+Fragment-Host: org.eclipse.mylyn.trac.core
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.junit;bundle-version="4.5.0",
+ org.mockito;bundle-version="[1.8.4,2.0.0)",
+ org.objenesis;bundle-version="[1.0.0,2.0.0)",
+ org.hamcrest;bundle-version="[1.0.0,2.0.0)",
+ org.eclipse.equinox.security
diff --git a/org.eclipse.mylyn.trac.core.tests/about.html b/org.eclipse.mylyn.trac.core.tests/about.html
new file mode 100644
index 0000000..d774b07
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/about.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+<head>
+<title>About</title>
+<meta http-equiv=Content-Type content="text/html; charset=ISO-8859-1">
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 25, 2008</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn.trac.core.tests/build.properties b/org.eclipse.mylyn.trac.core.tests/build.properties
new file mode 100644
index 0000000..9cbab3c
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/build.properties
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html
+src.includes = about.html
diff --git a/org.eclipse.mylyn.trac.core.tests/pom.xml b/org.eclipse.mylyn.trac.core.tests/pom.xml
new file mode 100644
index 0000000..8d6a5d9
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/pom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.mylyn.tasks-parent</artifactId>
+ <groupId>org.eclipse.mylyn.tasks</groupId>
+ <version>3.9.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>org.eclipse.mylyn.trac.core.tests</artifactId>
+ <version>3.9.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/org.eclipse.mylyn.trac.core.tests/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParserTest.java b/org.eclipse.mylyn.trac.core.tests/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParserTest.java
new file mode 100644
index 0000000..ce5a025
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core.tests/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParserTest.java
@@ -0,0 +1,61 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Tasktop Technologies 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:
+ * Tasktop Technologies - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.core.client;
+
+import static org.junit.Assert.assertEquals;
+
+import java.io.BufferedReader;
+import java.io.StringReader;
+
+import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
+import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
+import org.junit.Test;
+
+/**
+ * @author Steffen Pingel
+ */
+public class WebSearchResultParserTest {
+
+ private final WebSearchResultParser parser = new WebSearchResultParser();
+
+ @Test
+ public void testParseEmptyValue() throws Exception {
+ String input = "id\tsummary\tmilestone\towner\ttype\tstatus\tpriority\n";
+ input += "32\tsearchMilestone2 Ls9JM2\tmilestone1\t\tdefect\tnew\tmajor\n";
+ parser.parse(new BufferedReader(new StringReader(input)));
+ assertEquals(1, parser.getTickets().size());
+ TracTicket ticket = parser.getTickets().get(0);
+ assertEquals(32, ticket.getId());
+ assertEquals("searchMilestone2 Ls9JM2", ticket.getValue(Key.SUMMARY));
+ assertEquals("milestone1", ticket.getValue(Key.MILESTONE));
+ assertEquals("", ticket.getValue(Key.OWNER));
+ assertEquals("new", ticket.getValue(Key.STATUS));
+ assertEquals("major", ticket.getValue(Key.PRIORITY));
+ }
+
+ @Test
+ public void testParseEmptyValue_Trac0_11() throws Exception {
+ String input = "id\towner\ttype\tstatus\tpriority\tcomponent\tversion\n";
+ input += "58\t< default >\tdefect\tnew\tmajor\t--\t--\n";
+ parser.parse(new BufferedReader(new StringReader(input)));
+ assertEquals(1, parser.getTickets().size());
+ TracTicket ticket = parser.getTickets().get(0);
+ assertEquals(58, ticket.getId());
+ assertEquals("< default >", ticket.getValue(Key.OWNER));
+ assertEquals("defect", ticket.getValue(Key.TYPE));
+ assertEquals("new", ticket.getValue(Key.STATUS));
+ assertEquals("major", ticket.getValue(Key.PRIORITY));
+ assertEquals(null, ticket.getValue(Key.COMPONENT));
+ assertEquals(null, ticket.getValue(Key.VERSION));
+ }
+
+}
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
index a33495b..b44583f 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/AbstractTracClient.java
@@ -98,9 +98,22 @@ public abstract class AbstractTracClient implements ITracClient {
protected void authenticateAccountManager(HttpClient httpClient, HostConfiguration hostConfiguration,
AuthenticationCredentials credentials, IProgressMonitor monitor) throws IOException, TracLoginException {
+ String formToken = getFormToken(httpClient);
+ authenticateAccountManagerInternal(httpClient, hostConfiguration, credentials, monitor, formToken);
+
+ // form token is based on a cookie which may have changed due to the login post
+ // re-try with new token to ensure we are logging in with the right token, otherwise user won't be logged in
+ String newFormToken = getFormToken(httpClient);
+ if (formToken.length() == 0 && !formToken.equals(newFormToken)) {
+ authenticateAccountManagerInternal(httpClient, hostConfiguration, credentials, monitor, newFormToken);
+ }
+ }
+
+ public void authenticateAccountManagerInternal(HttpClient httpClient, HostConfiguration hostConfiguration,
+ AuthenticationCredentials credentials, IProgressMonitor monitor, String formToken) throws IOException,
+ TracLoginException {
PostMethod post = new PostMethod(WebUtil.getRequestPath(repositoryUrl + LOGIN_URL));
post.setFollowRedirects(false);
- String formToken = getFormToken(httpClient);
NameValuePair[] data = { new NameValuePair("referer", ""), //$NON-NLS-1$ //$NON-NLS-2$
new NameValuePair("user", credentials.getUserName()), //$NON-NLS-1$
new NameValuePair("password", credentials.getPassword()), new NameValuePair("__FORM_TOKEN", formToken) }; //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
index 078a16f..9660753 100644
--- a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/TracWebClient.java
@@ -37,10 +37,7 @@ import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.lang.StringEscapeUtils;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.OperationCanceledException;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.net.AbstractWebLocation;
import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
@@ -51,7 +48,6 @@ import org.eclipse.mylyn.commons.net.Policy;
import org.eclipse.mylyn.commons.net.SslCertificateException;
import org.eclipse.mylyn.commons.net.UnsupportedRequestException;
import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.internal.trac.core.TracCorePlugin;
import org.eclipse.mylyn.internal.trac.core.model.TracComment;
import org.eclipse.mylyn.internal.trac.core.model.TracComponent;
import org.eclipse.mylyn.internal.trac.core.model.TracMilestone;
@@ -68,7 +64,6 @@ import org.eclipse.mylyn.internal.trac.core.model.TracTicketStatus;
import org.eclipse.mylyn.internal.trac.core.model.TracTicketType;
import org.eclipse.mylyn.internal.trac.core.model.TracVersion;
import org.eclipse.mylyn.internal.trac.core.util.TracHttpClientTransportFactory.TracHttpException;
-import org.eclipse.mylyn.internal.trac.core.util.TracUtil;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -480,58 +475,23 @@ public class TracWebClient extends AbstractTracClient {
}
}
- public void search(TracSearch query, List<TracTicket> tickets, IProgressMonitor monitor) throws TracException {
+ public void search(TracSearch query, List<TracTicket> result, IProgressMonitor monitor) throws TracException {
GetMethod method = connect(repositoryUrl + ITracClient.QUERY_URL + query.toUrl(), monitor);
try {
InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(in, method.getResponseCharSet()));
- String line;
- Map<String, String> constantValues = getExactMatchValues(query);
-
- // first line contains names of returned ticket fields
- line = reader.readLine();
- if (line == null) {
- throw new InvalidTicketException();
- }
- // the utf-8 output in Trac 1.0 starts with a byte-order mark which
- // is passed to the tokenizer since it would otherwise end up in the first token
- StringTokenizer t = new StringTokenizer(line, "\ufeff\t"); //$NON-NLS-1$
- Key[] fields = new Key[t.countTokens()];
- for (int i = 0; i < fields.length; i++) {
- fields[i] = Key.fromKey(t.nextToken());
- }
-
- // create a ticket for each following line of output
- while ((line = reader.readLine()) != null) {
- t = new StringTokenizer(line, "\t"); //$NON-NLS-1$
- TracTicket ticket = new TracTicket();
- for (int i = 0; i < fields.length && t.hasMoreTokens(); i++) {
- if (fields[i] != null) {
- try {
- if (fields[i] == Key.ID) {
- ticket.setId(Integer.parseInt(t.nextToken()));
- } else if (fields[i] == Key.TIME) {
- ticket.setCreated(TracUtil.parseDate(Integer.parseInt(t.nextToken())));
- } else if (fields[i] == Key.CHANGE_TIME) {
- ticket.setLastChanged(TracUtil.parseDate(Integer.parseInt(t.nextToken())));
- } else {
- ticket.putBuiltinValue(fields[i], parseTicketValue(t.nextToken()));
- }
- } catch (NumberFormatException e) {
- StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.ID_PLUGIN,
- "Error parsing response: '" + line + "'", e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
+ WebSearchResultParser parser = new WebSearchResultParser();
+ parser.parse(reader);
+ Map<String, String> constantValues = getExactMatchValues(query);
+ for (TracTicket ticket : parser.getTickets()) {
if (ticket.isValid()) {
for (String key : constantValues.keySet()) {
- ticket.putValue(key, parseTicketValue(constantValues.get(key)));
+ ticket.putValue(key, WebSearchResultParser.parseTicketValue(constantValues.get(key)));
}
-
- tickets.add(ticket);
+ result.add(ticket);
}
}
} finally {
@@ -545,16 +505,6 @@ public class TracWebClient extends AbstractTracClient {
}
/**
- * Trac has sepcial encoding rules for the returned output: None is represented by "--".
- */
- private String parseTicketValue(String value) {
- if ("--".equals(value)) { //$NON-NLS-1$
- return ""; //$NON-NLS-1$
- }
- return value;
- }
-
- /**
* Extracts constant values from <code>query</code>. The Trac query script does not return fields that matched
* exactly againt a single value.
*/
diff --git a/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParser.java b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParser.java
new file mode 100644
index 0000000..fdb2c8e
--- /dev/null
+++ b/org.eclipse.mylyn.trac.core/src/org/eclipse/mylyn/internal/trac/core/client/WebSearchResultParser.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Steffen Pingel 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:
+ * Steffen Pingel - initial API and implementation
+ *******************************************************************************/
+
+package org.eclipse.mylyn.internal.trac.core.client;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
+import org.eclipse.mylyn.internal.trac.core.model.TracTicket.Key;
+import org.eclipse.mylyn.internal.trac.core.util.TracUtil;
+
+public class WebSearchResultParser {
+
+ private final List<TracTicket> tickets = new ArrayList<TracTicket>();
+
+ public void parse(BufferedReader reader) throws IOException, TracException {
+ Key[] fields = parseHeader(reader);
+ parseTickets(reader, fields);
+ }
+
+ public void parseTickets(BufferedReader reader, Key[] fields) throws IOException, InvalidTicketException {
+ // create a ticket for each following line of output
+ String line;
+ while ((line = reader.readLine()) != null) {
+ TracTicket ticket = new TracTicket();
+ tickets.add(ticket);
+
+ // include delimiters to detect empty values
+ StringTokenizer t = new StringTokenizer(line, "\t", true); //$NON-NLS-1$
+ for (int i = 0; i < fields.length && t.hasMoreTokens(); i++) {
+ String nextToken = t.nextToken();
+ if (nextToken.equals("\t")) { //$NON-NLS-1$
+ // process empty value
+ nextToken = ""; //$NON-NLS-1$
+ } else if (t.hasMoreTokens()) {
+ // skip delimiter
+ t.nextToken();
+ }
+ Key key = fields[i];
+ if (key != null) {
+ assignTicketValue(ticket, key, nextToken);
+ }
+ }
+ }
+ }
+
+ public void assignTicketValue(TracTicket ticket, Key key, String value) throws InvalidTicketException {
+ try {
+ if (key == Key.ID) {
+ ticket.setId(Integer.parseInt(value));
+ } else if (key == Key.TIME) {
+ ticket.setCreated(TracUtil.parseDate(Integer.parseInt(value)));
+ } else if (key == Key.CHANGE_TIME) {
+ ticket.setLastChanged(TracUtil.parseDate(Integer.parseInt(value)));
+ } else {
+ ticket.putBuiltinValue(key, parseTicketValue(value));
+ }
+ } catch (NumberFormatException e) {
+ // ignore to avoid spamming log
+// StatusHandler.log(new Status(IStatus.WARNING, TracCorePlugin.ID_PLUGIN, NLS.bind(
+// "Error parsing response: ''{0}''", line), e)); //$NON-NLS-1$
+ }
+ }
+
+ private Key[] parseHeader(BufferedReader reader) throws IOException, InvalidTicketException {
+ // first line contains names of returned ticket fields
+ String line = reader.readLine();
+ if (line == null) {
+ throw new InvalidTicketException();
+ }
+ // the utf-8 output in Trac 1.0 starts with a byte-order mark which
+ // is passed to the tokenizer since it would otherwise end up in the first token
+ StringTokenizer t = new StringTokenizer(line, "\ufeff\t"); //$NON-NLS-1$
+ Key[] fields = new Key[t.countTokens()];
+ for (int i = 0; i < fields.length; i++) {
+ fields[i] = Key.fromKey(t.nextToken());
+ }
+ return fields;
+ }
+
+ public List<TracTicket> getTickets() {
+ return tickets;
+ }
+
+ /**
+ * Trac has special encoding rules for the returned output: None is represented by "--".
+ */
+ public static String parseTicketValue(String value) {
+ if ("--".equals(value)) { //$NON-NLS-1$
+ return null;
+ }
+ return value;
+ }
+
+}
diff --git a/org.eclipse.mylyn.trac.tests/.gitignore b/org.eclipse.mylyn.trac.tests/.gitignore
index 7ee7b6c..b1a4b0b 100644
--- a/org.eclipse.mylyn.trac.tests/.gitignore
+++ b/org.eclipse.mylyn.trac.tests/.gitignore
@@ -1 +1,2 @@
/local.json
+/.local.json
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
index 49e567f..5be3afc 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientFactoryTest.java
@@ -61,25 +61,42 @@ public class TracClientFactoryTest extends TestCase {
WebLocation location = new WebLocation(url, credentials.getUserName(), credentials.getPassword());
Version version = TracClientFactory.probeClient(location);
if (fixture.isXmlRpcEnabled()) {
+ // assertion is only meaningful for XML-RPC since web fixtures will also probe XML-RPC if available
assertEquals(Version.XML_RPC, version);
- } else {
- assertEquals(Version.TRAC_0_9, version);
}
+ }
- location = new WebLocation(url, "", "");
- version = TracClientFactory.probeClient(location);
- assertEquals(Version.TRAC_0_9, version);
+ public void testProbeClientNoCredentials() throws Exception {
+ String url = fixture.getRepositoryUrl();
+ WebLocation location = new WebLocation(url, "", "");
+ try {
+ Version version = TracClientFactory.probeClient(location);
+ if (fixture.requiresAuthentication()) {
+ fail("Expected TracLoginException");
+ }
+ assertEquals(Version.TRAC_0_9, version);
+ } catch (TracLoginException e) {
+ if (fixture.requiresAuthentication()) {
+ // the remainder of the
+ return;
+ }
+ throw e;
+ }
+ }
+ public void testProbeClientInvalidCredentials() throws Exception {
try {
- location = new WebLocation(url, "invaliduser", "password");
- version = TracClientFactory.probeClient(location);
+ WebLocation location = new WebLocation(fixture.getRepositoryUrl(), "invaliduser", "password");
+ Version version = TracClientFactory.probeClient(location);
fail("Expected TracLoginException, got " + version);
} catch (TracLoginException e) {
}
+ }
+ public void testProbeClientInvalidLocation() throws Exception {
try {
- location = new WebLocation(url + "/nonexistant", "", "");
- version = TracClientFactory.probeClient(location);
+ WebLocation location = new WebLocation(fixture.getRepositoryUrl() + "/nonexistant", "", "");
+ Version version = TracClientFactory.probeClient(location);
fail("Expected TracException, got " + version);
} catch (TracException e) {
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
index db64b28..a2ad390 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracClientTest.java
@@ -75,7 +75,7 @@ public class TracClientTest extends TestCase {
public void testGetTicket() throws Exception {
TracTicket expectedTicket = harness.createTicket("getTicket");
TracTicket ticket = client.getTicket(expectedTicket.getId(), null);
- TracTestUtil.assertTicketEquals(expectedTicket, ticket);
+ TracTestUtil.assertTicketEquals(client.getAccessMode(), expectedTicket, ticket);
}
public void testGetTicketInvalidId() throws Exception {
@@ -87,12 +87,13 @@ public class TracClientTest extends TestCase {
}
public void testGetTicketUmlaute() throws Exception {
- TracTicket ticket = harness.createTicket("test html entities: \u00E4\u00F6\u00FC");
+ TracTicket ticket = harness.newTicket("test html entities: \u00E4\u00F6\u00FC");
+ ticket.putBuiltinValue(Key.DESCRIPTION, "\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n");
+ ticket = harness.createTicket(ticket);
+
+ ticket = client.getTicket(ticket.getId(), null);
assertEquals("test html entities: \u00E4\u00F6\u00FC", ticket.getValue(Key.SUMMARY));
if (client.getAccessMode() == Version.XML_RPC) {
- ticket.putBuiltinValue(Key.DESCRIPTION, "\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n");
- client.updateTicket(ticket, "", null);
- ticket = client.getTicket(ticket.getId(), null);
assertEquals("\u00C4\u00D6\u00DC\n\nmulti\nline\n\n'''bold'''\n", ticket.getValue(Key.DESCRIPTION));
} else {
assertEquals(null, ticket.getValue(Key.DESCRIPTION));
@@ -176,7 +177,11 @@ public class TracClientTest extends TestCase {
}
public void testSearchMilestoneAmpersand() throws Exception {
- harness.createMilestone("mile&stone");
+ if (!harness.hasMilestone("mile&stone")) {
+ // ignore test
+ return;
+ }
+
TracTicket ticket = harness.createTicketWithMilestone("searchMilestoneAmpersand", "mile&stone");
TracSearch search = new TracSearch();
@@ -201,7 +206,7 @@ public class TracClientTest extends TestCase {
TracTicket ticket = harness.createTicket("statusClosed");
ticket.putBuiltinValue(Key.STATUS, "closed");
ticket.putBuiltinValue(Key.RESOLUTION, "fixed");
- client.updateTicket(ticket, "", null);
+ harness.udpateTicket(ticket);
ticket = client.getTicket(ticket.getId(), null);
assertEquals("closed", ticket.getValue(Key.STATUS));
@@ -209,6 +214,10 @@ public class TracClientTest extends TestCase {
}
public void testUpdateAttributesAnonymous() throws Exception {
+ if (fixture.requiresAuthentication()) {
+ return;
+ }
+
client = fixture.connect(fixture.getRepositoryUrl(), "", "");
assertNull(client.getMilestones());
try {
@@ -285,6 +294,10 @@ public class TracClientTest extends TestCase {
}
public void testValidateAnonymousLogin() throws Exception {
+ if (fixture.requiresAuthentication()) {
+ return;
+ }
+
client = fixture.connect(fixture.getRepositoryUrl(), "", "");
try {
client.validate(new NullProgressMonitor());
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
index 670d483..1b44088 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/client/TracXmlRpcClientTest.java
@@ -65,6 +65,9 @@ public class TracXmlRpcClientTest extends TestCase {
}
public void testValidateFailNoAuth() throws Exception {
+ if (harness.getFixture().requiresAuthentication()) {
+ return;
+ }
client = (TracXmlRpcClient) TracFixture.current().connect(client.getUrl(), "", "");
try {
client.validate(new NullProgressMonitor());
@@ -121,8 +124,8 @@ public class TracXmlRpcClientTest extends TestCase {
List<TracTicket> result = new ArrayList<TracTicket>();
client.search(search, result, null);
assertEquals(1, result.size());
- // work around missing value
- ticket.putBuiltinValue(Key.OWNER, "somebody");
+ // the value varies between Trac versions, e.g. "somebody", "< default >"
+ ticket.putBuiltinValue(Key.OWNER, result.get(0).getValue(Key.OWNER));
TracTestUtil.assertTicketEquals(ticket, result.get(0));
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
index 8d1eecf..ea22177 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracFixture.java
@@ -144,7 +144,7 @@ public class TracFixture extends TestFixture {
}
public boolean isXmlRpcEnabled() {
- return true;
+ return Version.XML_RPC.name().equals(getAccessMode());
}
public TaskRepository singleRepository(TracRepositoryConnector connector) {
@@ -189,4 +189,8 @@ public class TracFixture extends TestFixture {
return tags.contains(tag);
}
+ public boolean requiresAuthentication() {
+ return getInfo().contains("AllBasicAuth");
+ }
+
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
index eb3dfcf..2216784 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracHarness.java
@@ -40,15 +40,27 @@ public class TracHarness {
this.fixture = fixture;
}
- public TracFixture getFixture() {
- return fixture;
+ public void attachFile(int ticketId, String name, String content) throws Exception {
+ priviledgedClient().putAttachmentData(ticketId, name, "", new ByteArrayInputStream(content.getBytes("UTF-8")),
+ null, true);
}
- private TracXmlRpcClient priviledgedClient() throws Exception {
- if (priviledgedClient == null) {
- priviledgedClient = (TracXmlRpcClient) fixture.connectXmlRpc(PrivilegeLevel.USER);
- }
- return priviledgedClient;
+ public TracRepositoryConnector connector() {
+ return fixture.connector();
+ }
+
+ public void createMilestone(String milestone) throws Exception {
+ new XmlRpcServer(priviledgedClient()).ticketMilestone(milestone).deleteAndCreate();
+ }
+
+ public ITask createTask(String summary) throws Exception {
+ TracTicket ticket = createTicket(summary);
+ return getTask(ticket);
+ }
+
+ public TaskData createTaskData(String summary) throws Exception {
+ TracTicket ticket = createTicket(summary);
+ return fixture.connector().getTaskData(repository(), Integer.toString(ticket.getId()), null);
}
public TracTicket createTicket(String summary) throws Exception {
@@ -61,23 +73,24 @@ public class TracHarness {
return priviledgedClient().getTicket(id, null);
}
- public TracTicket newTicket(String summary) throws InvalidTicketException {
- TracTicket ticket = new TracTicket();
- ticket.putBuiltinValue(Key.SUMMARY, summary);
- ticket.putBuiltinValue(Key.DESCRIPTION, "");
- return ticket;
- }
-
- public void createMilestone(String milestone) throws Exception {
- new XmlRpcServer(priviledgedClient()).ticketMilestone(milestone).deleteAndCreate();
- }
-
public TracTicket createTicketWithMilestone(String summary, String milestone) throws Exception {
TracTicket ticket = newTicket(summary);
ticket.putBuiltinValue(Key.MILESTONE, milestone);
return createTicket(ticket);
}
+ public void createWikiPage(String pageName, String content) throws Exception {
+ priviledgedClient().putWikipage(pageName, content, Collections.<String, Object> emptyMap(), null);
+ }
+
+ public void dispose() {
+ // TODO delete created tickets
+ }
+
+ public TracFixture getFixture() {
+ return fixture;
+ }
+
public ITask getTask(String taskId) throws Exception {
TaskRepository repository = repository();
TaskData taskData = fixture.connector().getTaskData(repository, taskId, null);
@@ -86,22 +99,28 @@ public class TracHarness {
return task;
}
- public void dispose() {
-
- }
-
public ITask getTask(TracTicket ticket) throws Exception {
return getTask(Integer.toString(ticket.getId()));
}
- public ITask createTask(String summary) throws Exception {
- TracTicket ticket = createTicket(summary);
- return getTask(ticket);
+ public boolean hasMilestone(String milestone) {
+ try {
+ new XmlRpcServer(priviledgedClient()).ticketMilestone(milestone).get();
+ } catch (Exception e) {
+ return false;
+ }
+ return true;
}
- public TaskData createTaskData(String summary) throws Exception {
- TracTicket ticket = createTicket(summary);
- return fixture.connector().getTaskData(repository(), Integer.toString(ticket.getId()), null);
+ public boolean isXmlRpc() {
+ return Version.XML_RPC.name().equals(repository().getVersion());
+ }
+
+ public TracTicket newTicket(String summary) throws InvalidTicketException {
+ TracTicket ticket = new TracTicket();
+ ticket.putBuiltinValue(Key.SUMMARY, summary);
+ ticket.putBuiltinValue(Key.DESCRIPTION, "");
+ return ticket;
}
public TaskRepository repository() {
@@ -111,21 +130,15 @@ public class TracHarness {
return repository;
}
- public TracRepositoryConnector connector() {
- return fixture.connector();
+ public void udpateTicket(TracTicket ticket) throws Exception {
+ priviledgedClient().updateTicket(ticket, "", null);
}
- public void attachFile(int ticketId, String name, String content) throws Exception {
- priviledgedClient().putAttachmentData(ticketId, name, "", new ByteArrayInputStream(content.getBytes("UTF-8")),
- null, true);
- }
-
- public boolean isXmlRpc() {
- return Version.XML_RPC.name().equals(repository().getVersion());
- }
-
- public void createWikiPage(String pageName, String content) throws Exception {
- priviledgedClient().putWikipage(pageName, content, Collections.<String, Object> emptyMap(), null);
+ private TracXmlRpcClient priviledgedClient() throws Exception {
+ if (priviledgedClient == null) {
+ priviledgedClient = (TracXmlRpcClient) fixture.connectXmlRpc(PrivilegeLevel.USER);
+ }
+ return priviledgedClient;
}
}
diff --git a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
index b991ecd..22caea3 100644
--- a/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
+++ b/org.eclipse.mylyn.trac.tests/src/org/eclipse/mylyn/trac/tests/support/TracTestUtil.java
@@ -20,6 +20,7 @@ import java.util.Map;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
+import org.eclipse.mylyn.internal.trac.core.client.ITracClient.Version;
import org.eclipse.mylyn.internal.trac.core.model.TracTicket;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
@@ -74,7 +75,8 @@ public class TracTestUtil {
}
}
- public static void assertTicketEquals(TracTicket expectedTicket, TracTicket actualTicket) throws Exception {
+ public static void assertTicketEquals(Version accessMode, TracTicket expectedTicket, TracTicket actualTicket)
+ throws Exception {
assertTrue(actualTicket.isValid());
Map<?, ?> expectedValues = expectedTicket.getValues();
@@ -96,8 +98,16 @@ public class TracTestUtil {
// ignore internal values
continue;
}
+ if (accessMode == Version.TRAC_0_9 && expected == null && "".equals(actual)) {
+ // the web-client handles some values as the empty string that are represented as null in XML-RPC
+ continue;
+ }
assertEquals("Values for key '" + key + "' did not match", expected, actual);
}
}
+ public static void assertTicketEquals(TracTicket expectedTicket, TracTicket actualTicket) throws Exception {
+ assertTicketEquals(null, expectedTicket, actualTicket);
+ }
+
}
diff --git a/pom.xml b/pom.xml
index 4db7f92..e47d88f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -88,6 +88,7 @@
<module>org.eclipse.mylyn.tests.util</module>
<module>org.eclipse.mylyn.trac-feature</module>
<module>org.eclipse.mylyn.trac.core</module>
+ <module>org.eclipse.mylyn.trac.core.tests</module>
<module>org.eclipse.mylyn.trac.tests</module>
<module>org.eclipse.mylyn.trac.ui</module>
<module>org.eclipse.mylyn.trac.ui.tests</module>