Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.mylyn-feature/.project17
-rw-r--r--org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn-feature/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn-feature/about.html27
-rw-r--r--org.eclipse.mylyn-feature/build.properties19
-rw-r--r--org.eclipse.mylyn-feature/epl-v10.html328
-rw-r--r--org.eclipse.mylyn-feature/feature-compatibility.xml469
-rw-r--r--org.eclipse.mylyn-feature/feature.properties62
-rw-r--r--org.eclipse.mylyn-feature/feature.xml184
-rw-r--r--org.eclipse.mylyn-feature/license.html79
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.classpath15
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.cvsignore3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.project34
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.mylyn.bugzilla.core/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.core/build-user.xml13
-rw-r--r--org.eclipse.mylyn.bugzilla.core/build.properties16
-rw-r--r--org.eclipse.mylyn.bugzilla.core/plugin.properties13
-rw-r--r--org.eclipse.mylyn.bugzilla.core/plugin.xml23
-rw-r--r--org.eclipse.mylyn.bugzilla.core/schema/languages.exsd116
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java134
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentMapper.java102
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java233
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java400
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java2016
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java40
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java85
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java447
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java157
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java116
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlagMapper.java136
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java107
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java67
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java600
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryResponse.java53
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java111
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java101
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java704
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java129
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java70
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java69
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java273
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java7
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java255
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java62
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java710
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java57
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java42
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java106
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java586
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java662
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java26
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java71
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java38
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java160
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java48
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java19
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java19
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java236
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java31
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java42
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java98
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java37
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java101
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java118
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java118
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties12
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties132
-rw-r--r--org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/service/temp.txt1
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.classpath15
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.cvsignore2
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.project34
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.api.tools.prefs145
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/META-INF/MANIFEST.MF35
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/build.properties17
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AbstractBugzillaTest.java187
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/AllBugzillaTests.java50
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaConfigurationTest.java260
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaDateTimeTests.java182
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaProductParserTest.java88
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepository32Test.java532
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaRepositoryConnectorTest.java1307
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchDialogTest.java71
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaSearchTest.java119
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskCompletionTest.java107
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskDataHandlerTest.java182
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskHyperlinkDetectorTest.java284
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTaskListTest.java172
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestPlugin.java100
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaTestUtil.java54
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/BugzillaVersionTest.java74
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/EncodingTest.java100
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/IBugzillaTestConstants.java39
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryEditorWizardTest.java189
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryReportFactoryTest.java463
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/RepositoryTaskHandleTest.java59
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskEditorTest.java119
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/TaskListStandaloneTest.java190
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaQueryTest.java236
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/src/org/eclipse/mylyn/bugzilla/tests/headless/BugzillaTaskHistoryTest.java146
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/configuration/rdfconfig218.txt461
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/contexts/.cvsignore1
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/contexts/empty.txt0
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-1-full.html719
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-eclipse.html158
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/bug-not-found-hipikat.html142
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/cdt-page.html184
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug220.html441
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/enter-bug2201.html493
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/equinox-page.html177
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/gmt-page.html175
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/hipikat-copy-bug-1-full.html157
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/platform-page.html299
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/product-page-1-product-hipikat.html256
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-220.html667
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-2201.html859
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/test-report-222attachment.html859
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/pages/ve-page.html178
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/1.html377
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/2.html406
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/40152.html1228
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4548.html377
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/4862.html401
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/67395.html390
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76146.html406
-rw-r--r--org.eclipse.mylyn.bugzilla.tests/testdata/reports-stacktrace/76388.html426
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.classpath17
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.cvsignore1
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.project34
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF31
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/about.html27
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build-user.xml13
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/build.properties18
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-comment.gifbin343 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-dirty.gifbin237 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-favorite.gifbin358 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-new.gifbin233 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search-new.gifbin596 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-search.gifbin583 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug-small.gifbin132 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/bug.gifbin159 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-conflicting.gifbin187 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-incoming.gifbin114 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/elcl16/overlay-outgoing.gifbin64 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-new.gifbin359 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug-refresh.gifbin362 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-bug.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-remote.gifbin89 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository-new.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/etool16/task-repository.gifbin216 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/bugzilla-logo.gifbin1026 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bug.gifbin77 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-bugzilla.gifbin275 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-critical.gifbin105 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-enhancement.gifbin81 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-feature.gifbin78 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-major.gifbin77 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-minor.gifbin77 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/eview16/overlay-normal.gifbin78 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/find.gifbin157 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/icons/wizban/bug-wizard.gifbin3895 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.properties17
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/plugin.xml116
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaImages.java100
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaSearchHandler.java48
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiExtensionReader.java93
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/BugzillaUiPlugin.java242
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaNotObsoleteAttachmentAction.java24
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaObsoleteAttachmentAction.java23
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaUpdateAttachmentAction.java115
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/Messages.java32
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/UpdateAttachmentJob.java156
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/messages.properties12
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaCcAttributeEditor.java96
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaKeywordAttributeEditor.java115
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPeoplePart.java209
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaPlanningEditorPart.java168
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java409
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPageFactory.java64
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaVotesEditor.java116
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java181
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/KeywordsDialog.java160
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/Messages.java57
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/messages.properties30
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java1948
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSeveritySearchSorter.java79
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaStateSearchSorter.java96
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/Messages.java107
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/messages.properties50
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaConnectorUi.java221
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryDialog.java116
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaCustomQueryWizardPage.java126
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaQueryTypeWizardPage.java88
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaRepositorySettingsPage.java348
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskAttachmentPage.java188
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/BugzillaTaskListMigrator.java77
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java83
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/StackTrace.java373
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties41
-rw-r--r--org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/NewBugzillaTaskWizard.java150
-rw-r--r--org.eclipse.mylyn.help.sdk/.classpath7
-rw-r--r--org.eclipse.mylyn.help.sdk/.cvsignore4
-rw-r--r--org.eclipse.mylyn.help.sdk/.externalToolBuilders/Javadoc Builder.launch20
-rw-r--r--org.eclipse.mylyn.help.sdk/.project44
-rw-r--r--org.eclipse.mylyn.help.sdk/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.help.sdk/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.help.sdk/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.help.sdk/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.help.sdk/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.help.sdk/META-INF/MANIFEST.MF10
-rw-r--r--org.eclipse.mylyn.help.sdk/about.html27
-rw-r--r--org.eclipse.mylyn.help.sdk/build-helper.xml62
-rw-r--r--org.eclipse.mylyn.help.sdk/build.properties17
-rw-r--r--org.eclipse.mylyn.help.sdk/customBuildCallbacks.xml169
-rw-r--r--org.eclipse.mylyn.help.sdk/doc/book.css1
-rw-r--r--org.eclipse.mylyn.help.sdk/doc/notices.html22
-rw-r--r--org.eclipse.mylyn.help.sdk/plugin.properties13
-rw-r--r--org.eclipse.mylyn.help.sdk/plugin.xml41
-rw-r--r--org.eclipse.mylyn.help.sdk/src/.placeholder0
-rw-r--r--org.eclipse.mylyn.help.sdk/toc-reference.xml55
-rw-r--r--org.eclipse.mylyn.help.sdk/toc.xml28
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.classpath16
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.cvsignore1
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.project34
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.bugs/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.tasks.bugs/META-INF/MANIFEST.MF24
-rw-r--r--org.eclipse.mylyn.tasks.bugs/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.bugs/build.properties18
-rw-r--r--org.eclipse.mylyn.tasks.bugs/icons/etool16/report-bug.gifbin580 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.bugs/icons/etool16/task-bug-new.gifbin359 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.bugs/icons/etool16/task-new.gifbin334 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.bugs/icons/etool16/task-repository-new.gifbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.bugs/plugin.properties27
-rw-r--r--org.eclipse.mylyn.tasks.bugs/plugin.xml114
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/pluginRepositoryMappings.exsd181
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/support.exsd348
-rw-r--r--org.eclipse.mylyn.tasks.bugs/schema/taskContributors.exsd109
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractSupportHandler.java40
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/AbstractTaskContributor.java69
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/IProduct.java30
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/IProvider.java28
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/ISupportRequest.java30
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/ISupportResponse.java31
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/provisional/tasks/bugs/ITaskContribution.java41
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AbstractSupportElement.java68
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/AttributeTaskMapper.java119
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/DefaultSupportHandler.java229
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/IRepositoryConstants.java57
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/KeyValueMapping.java90
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/Messages.java69
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/ProductRepositoryMapping.java53
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportCategory.java60
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportHandlerManager.java151
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProduct.java137
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProvider.java57
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportProviderManager.java378
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/SupportRequest.java125
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TaskErrorReporter.java116
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/TasksBugsPlugin.java87
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/Messages.java47
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromErrorAction.java136
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/NewTaskFromMarkerHandler.java81
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/ReportBugAction.java44
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/actions/messages.properties21
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/messages.properties31
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ErrorLogStatus.java59
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/Messages.java57
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ProductStatus.java34
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportBugOrEnhancementWizard.java166
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorPage.java177
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/ReportErrorWizard.java67
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/SelectSupportElementPage.java418
-rw-r--r--org.eclipse.mylyn.tasks.bugs/src/org/eclipse/mylyn/internal/tasks/bugs/wizards/messages.properties28
-rw-r--r--org.eclipse.mylyn.tasks.tests/.classpath16
-rw-r--r--org.eclipse.mylyn.tasks.tests/.cvsignore1
-rw-r--r--org.eclipse.mylyn.tasks.tests/.project34
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/.api_filters19
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.core.prefs342
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.jdt.ui.prefs63
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.ltk.core.refactoring.prefs3
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.mylyn.tasks.ui.prefs4
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.api.tools.prefs151
-rw-r--r--org.eclipse.mylyn.tasks.tests/.settings/org.eclipse.pde.prefs18
-rw-r--r--org.eclipse.mylyn.tasks.tests/META-INF/MANIFEST.MF43
-rw-r--r--org.eclipse.mylyn.tasks.tests/about.html27
-rw-r--r--org.eclipse.mylyn.tasks.tests/build.properties17
-rw-r--r--org.eclipse.mylyn.tasks.tests/plugin.xml80
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksPerformanceTests.java29
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AllTasksTests.java104
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/AttachmentSizeFormatterTest.java76
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/BackgroundSaveTest.java49
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentGroupStrategyTest.java240
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CommentQuoterTest.java73
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/CopyDetailsActionTest.java30
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/DateRangeTest.java173
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/LinkProviderTest.java101
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskFromSelectionActionTest.java68
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/NewTaskWizardRepositorySelectionTest.java93
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/PersonProposalProviderTest.java206
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ProjectRepositoryAssociationTest.java77
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/QueryExportImportTest.java290
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RefactorRepositoryUrlOperationTest.java206
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositorySettingsPageTest.java268
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/RepositoryTemplateManagerTest.java47
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ScheduledPresentationTest.java181
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/StackTraceDuplicateDetectorTest.java100
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationActionTest.java50
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivationHistoryTest.java328
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityManagerTest.java224
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskActivityTimingTest.java1331
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskAttachmentTest.java112
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskContainerTest.java39
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataExportTest.java204
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataImportTest.java124
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataManagerTest.java293
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDataStoreTest.java196
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskDiffUtilTest.java56
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskExportImportTest.java117
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskKeyComparatorTest.java69
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListBackupManagerTest.java69
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListContentProviderTest.java70
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListDropAdapterTest.java66
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListExternalizationTest.java384
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListPresentationTest.java33
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSaveManagerTest.java109
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListSorterTest.java301
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListTest.java555
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskListUiTest.java361
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskMapperTest.java186
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskPlanningEditorTest.java110
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoriesExternalizerTest.java111
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryFilterTests.java81
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryManagerTest.java329
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositorySorterTest.java75
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskRepositoryTest.java163
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTest.java78
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskTestUtil.java149
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TaskWorkingSetTest.java158
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksTestsPlugin.java47
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUiUtilTest.java175
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/TasksUtilTest.java47
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockAttachmentHandler.java57
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnector.java173
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryConnectorUi.java74
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockRepositoryQuery.java39
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/connector/MockTask.java65
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/FileTaskAttachmentSourceTest.java30
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/ITasksCoreConstantsTest.java41
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/TaskListUnmatchedContainerTest.java296
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/core/TaskRepositoryLocationTest.java106
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/data/TaskDataExternalizerTest.java193
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskContainerTest.java49
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/performance/TaskListPerformanceTest.java74
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/ContextPerspectiveManagerTest.java97
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/MarkTaskHandlerTest.java90
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/RetrieveTitleFromUrlTest.java47
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskAttachmentPropertyTesterTest.java46
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskHyperlinkDetectorTest.java95
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskListFilterTest.java180
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/TaskRelationHyperlinkDetectorTest.java35
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/EditorUtilTest.java116
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskEditorPartDescriptorTest.java62
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/ui/editor/TaskUrlHyperlinkDetectorTest.java116
-rw-r--r--org.eclipse.mylyn.tasks.tests/src/org/eclipse/mylyn/tasks/tests/util/TestTaskDataCollector.java53
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/activityTests/.activity.xml.zipbin342 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/activityTests/activity.xml.zipbin339 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/legacy/tasklist_0_4_8.xml11
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/performance/tasklist-4000.xml.zipbin284854 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdata-1.0-bug-219897.zipbin4526 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/context-history.xml11
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-69.xml11
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/local-70.xml11
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2006-02-16.zipbin2670 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/mylardata-2007-01-19.zipbin3275 -> 0 bytes
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/repositories.xml14
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/taskdataimporttest/tasklist.xml11
-rw-r--r--org.eclipse.mylyn.tasks.tests/testdata/tasklistdatamigrationtest/empty.txt0
399 files changed, 0 insertions, 53688 deletions
diff --git a/org.eclipse.mylyn-feature/.project b/org.eclipse.mylyn-feature/.project
deleted file mode 100644
index 3a69cb6b6..000000000
--- a/org.eclipse.mylyn-feature/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn-feature</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.pde.FeatureBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.FeatureNature</nature>
- </natures>
-</projectDescription>
diff --git a/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 1314ffa2f..000000000
--- a/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,342 +0,0 @@
-#Tue May 12 20:42:46 PDT 2009
-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.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.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-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.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.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-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.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=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.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.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-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_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=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.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.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.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_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index de64fe6c3..000000000
--- a/org.eclipse.mylyn-feature/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Thu Sep 11 16:27:18 PDT 2008
-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=11
-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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * @author ${user}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\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">/*******************************************************************************\r\n * Copyright (c) 2009 Tasktop Technologies and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * Tasktop Technologies - initial API and implementation\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\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">\r\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">\r\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">\r\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">\r\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\r\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\r\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}\r\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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\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)\r\n * ${see_to_overridden}\r\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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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}\r\n${package_declaration}\r\n\r\n${typecomment}\r\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">\r\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">\r\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">\r\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">\r\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\r\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\r\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}\r\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-feature/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index ea5169853..000000000
--- a/org.eclipse.mylyn-feature/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 02 15:29:46 PDT 2006
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=true
diff --git a/org.eclipse.mylyn-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index 96a7c9d2a..000000000
--- a/org.eclipse.mylyn-feature/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#Thu Dec 20 14:07:53 PST 2007
-eclipse.preferences.version=1
-project.repository.kind=bugzilla
-project.repository.url=https\://bugs.eclipse.org/bugs
diff --git a/org.eclipse.mylyn-feature/about.html b/org.eclipse.mylyn-feature/about.html
deleted file mode 100644
index d774b07c7..000000000
--- a/org.eclipse.mylyn-feature/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!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-feature/build.properties b/org.eclipse.mylyn-feature/build.properties
deleted file mode 100644
index f8c5f8f5f..000000000
--- a/org.eclipse.mylyn-feature/build.properties
+++ /dev/null
@@ -1,19 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2008 Mylyn project committers 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
-###############################################################################
-bin.includes = feature.properties,\
- feature.xml,\
- about.ini,\
- about.properties,\
- eclipse32.gif,\
- epl-v10.html,\
- license.html,\
- about.html
-src.includes = eclipse32.gif,\
- about.properties,\
- about.ini,\
- about.html
diff --git a/org.eclipse.mylyn-feature/epl-v10.html b/org.eclipse.mylyn-feature/epl-v10.html
deleted file mode 100644
index ed4b19665..000000000
--- a/org.eclipse.mylyn-feature/epl-v10.html
+++ /dev/null
@@ -1,328 +0,0 @@
-<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:w="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
-<meta name=ProgId content=Word.Document>
-<meta name=Generator content="Microsoft Word 9">
-<meta name=Originator content="Microsoft Word 9">
-<link rel=File-List
-href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
-<title>Eclipse Public License - Version 1.0</title>
-<!--[if gte mso 9]><xml>
- <o:DocumentProperties>
- <o:Revision>2</o:Revision>
- <o:TotalTime>3</o:TotalTime>
- <o:Created>2004-03-05T23:03:00Z</o:Created>
- <o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
- <o:Pages>4</o:Pages>
- <o:Words>1626</o:Words>
- <o:Characters>9270</o:Characters>
- <o:Lines>77</o:Lines>
- <o:Paragraphs>18</o:Paragraphs>
- <o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
- <o:Version>9.4402</o:Version>
- </o:DocumentProperties>
-</xml><![endif]--><!--[if gte mso 9]><xml>
- <w:WordDocument>
- <w:TrackRevisions/>
- </w:WordDocument>
-</xml><![endif]-->
-<style>
-<!--
- /* Font Definitions */
-@font-face
- {font-family:Tahoma;
- panose-1:2 11 6 4 3 5 4 4 2 4;
- mso-font-charset:0;
- mso-generic-font-family:swiss;
- mso-font-pitch:variable;
- mso-font-signature:553679495 -2147483648 8 0 66047 0;}
- /* Style Definitions */
-p.MsoNormal, li.MsoNormal, div.MsoNormal
- {mso-style-parent:"";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p
- {margin-right:0in;
- mso-margin-top-alt:auto;
- mso-margin-bottom-alt:auto;
- margin-left:0in;
- mso-pagination:widow-orphan;
- font-size:12.0pt;
- font-family:"Times New Roman";
- mso-fareast-font-family:"Times New Roman";}
-p.BalloonText, li.BalloonText, div.BalloonText
- {mso-style-name:"Balloon Text";
- margin:0in;
- margin-bottom:.0001pt;
- mso-pagination:widow-orphan;
- font-size:8.0pt;
- font-family:Tahoma;
- mso-fareast-font-family:"Times New Roman";}
-@page Section1
- {size:8.5in 11.0in;
- margin:1.0in 1.25in 1.0in 1.25in;
- mso-header-margin:.5in;
- mso-footer-margin:.5in;
- mso-paper-source:0;}
-div.Section1
- {page:Section1;}
--->
-</style>
-</head>
-
-<body lang=EN-US style='tab-interval:.5in'>
-
-<div class=Section1>
-
-<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
-</p>
-
-<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
-THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
-REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
-OF THIS AGREEMENT.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-in the case of the initial Contributor, the initial code and documentation
-distributed under this Agreement, and<br clear=left>
-b) in the case of each subsequent Contributor:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-changes to the Program, and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-additions to the Program;</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
-such changes and/or additions to the Program originate from and are distributed
-by that particular Contributor. A Contribution 'originates' from a Contributor
-if it was added to the Program by such Contributor itself or anyone acting on
-such Contributor's behalf. Contributions do not include additions to the
-Program which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii) are not derivative
-works of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
-entity that distributes the Program.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
-claims licensable by a Contributor which are necessarily infringed by the use
-or sale of its Contribution alone or when combined with the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
-distributed in accordance with this Agreement.</span> </p>
-
-<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
-receives the Program under this Agreement, including all Contributors.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-Subject to the terms of this Agreement, each Contributor hereby grants Recipient
-a non-exclusive, worldwide, royalty-free copyright license to<span
-style='color:red'> </span>reproduce, prepare derivative works of, publicly
-display, publicly perform, distribute and sublicense the Contribution of such
-Contributor, if any, and such derivative works, in source code and object code
-form.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-Subject to the terms of this Agreement, each Contributor hereby grants
-Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
-patent license under Licensed Patents to make, use, sell, offer to sell, import
-and otherwise transfer the Contribution of such Contributor, if any, in source
-code and object code form. This patent license shall apply to the combination
-of the Contribution and the Program if, at the time the Contribution is added
-by the Contributor, such addition of the Contribution causes such combination
-to be covered by the Licensed Patents. The patent license shall not apply to
-any other combinations which include the Contribution. No hardware per se is
-licensed hereunder. </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
-Recipient understands that although each Contributor grants the licenses to its
-Contributions set forth herein, no assurances are provided by any Contributor
-that the Program does not infringe the patent or other intellectual property
-rights of any other entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement of intellectual
-property rights or otherwise. As a condition to exercising the rights and
-licenses granted hereunder, each Recipient hereby assumes sole responsibility
-to secure any other intellectual property rights needed, if any. For example,
-if a third party patent license is required to allow Recipient to distribute
-the Program, it is Recipient's responsibility to acquire that license before
-distributing the Program.</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
-Each Contributor represents that to its knowledge it has sufficient copyright
-rights in its Contribution, if any, to grant the copyright license set forth in
-this Agreement. </span></p>
-
-<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
-
-<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
-Program in object code form under its own license agreement, provided that:</span>
-</p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it complies with the terms and conditions of this Agreement; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
-its license agreement:</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
-effectively disclaims on behalf of all Contributors all warranties and
-conditions, express and implied, including warranties or conditions of title
-and non-infringement, and implied warranties or conditions of merchantability
-and fitness for a particular purpose; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
-effectively excludes on behalf of all Contributors all liability for damages,
-including direct, indirect, special, incidental and consequential damages, such
-as lost profits; </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
-states that any provisions which differ from this Agreement are offered by that
-Contributor alone and not by any other party; and</span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
-states that source code for the Program is available from such Contributor, and
-informs licensees how to obtain it in a reasonable manner on or through a
-medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
-
-<p><span style='font-size:10.0pt'>When the Program is made available in source
-code form:</span> </p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
-it must be made available under this Agreement; and </span></p>
-
-<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
-copy of this Agreement must be included with each copy of the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
-copyright notices contained within the Program. </span></p>
-
-<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
-originator of its Contribution, if any, in a manner that reasonably allows
-subsequent Recipients to identify the originator of the Contribution. </span></p>
-
-<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
-
-<p><span style='font-size:10.0pt'>Commercial distributors of software may
-accept certain responsibilities with respect to end users, business partners
-and the like. While this license is intended to facilitate the commercial use
-of the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create potential
-liability for other Contributors. Therefore, if a Contributor includes the
-Program in a commercial product offering, such Contributor (&quot;Commercial
-Contributor&quot;) hereby agrees to defend and indemnify every other
-Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
-costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
-legal actions brought by a third party against the Indemnified Contributor to
-the extent caused by the acts or omissions of such Commercial Contributor in
-connection with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any claims or Losses
-relating to any actual or alleged intellectual property infringement. In order
-to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
-Contributor in writing of such claim, and b) allow the Commercial Contributor
-to control, and cooperate with the Commercial Contributor in, the defense and
-any related settlement negotiations. The Indemnified Contributor may participate
-in any such claim at its own expense.</span> </p>
-
-<p><span style='font-size:10.0pt'>For example, a Contributor might include the
-Program in a commercial product offering, Product X. That Contributor is then a
-Commercial Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance claims and
-warranties are such Commercial Contributor's responsibility alone. Under this
-section, the Commercial Contributor would have to defend claims against the
-other Contributors related to those performance claims and warranties, and if a
-court requires any other Contributor to pay any damages as a result, the
-Commercial Contributor must pay those damages.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
-WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
-WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
-MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and distributing the
-Program and assumes all risks associated with its exercise of rights under this
-Agreement , including but not limited to the risks and costs of program errors,
-compliance with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations. </span></p>
-
-<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
-
-<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
-AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
-ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
-THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
-THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
-
-<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
-
-<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
-or unenforceable under applicable law, it shall not affect the validity or
-enforceability of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be reformed to the
-minimum extent necessary to make such provision valid and enforceable.</span> </p>
-
-<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
-against any entity (including a cross-claim or counterclaim in a lawsuit)
-alleging that the Program itself (excluding combinations of the Program with
-other software or hardware) infringes such Recipient's patent(s), then such
-Recipient's rights granted under Section 2(b) shall terminate as of the date
-such litigation is filed. </span></p>
-
-<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
-shall terminate if it fails to comply with any of the material terms or
-conditions of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If all Recipient's
-rights under this Agreement terminate, Recipient agrees to cease use and
-distribution of the Program as soon as reasonably practicable. However,
-Recipient's obligations under this Agreement and any licenses granted by
-Recipient relating to the Program shall continue and survive. </span></p>
-
-<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
-copies of this Agreement, but in order to avoid inconsistency the Agreement is
-copyrighted and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including revisions) of
-this Agreement from time to time. No one other than the Agreement Steward has
-the right to modify this Agreement. The Eclipse Foundation is the initial
-Agreement Steward. The Eclipse Foundation may assign the responsibility to
-serve as the Agreement Steward to a suitable separate entity. Each new version
-of the Agreement will be given a distinguishing version number. The Program
-(including Contributions) may always be distributed subject to the version of
-the Agreement under which it was received. In addition, after a new version of
-the Agreement is published, Contributor may elect to distribute the Program
-(including its Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
-the intellectual property of any Contributor under this Agreement, whether
-expressly, by implication, estoppel or otherwise. All rights in the Program not
-expressly granted under this Agreement are reserved.</span> </p>
-
-<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
-State of New York and the intellectual property laws of the United States of
-America. No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose. Each party waives
-its rights to a jury trial in any resulting litigation.</span> </p>
-
-<p class=MsoNormal><![if !supportEmptyParas]>&nbsp;<![endif]><o:p></o:p></p>
-
-</div>
-
-</body>
-
-</html> \ No newline at end of file
diff --git a/org.eclipse.mylyn-feature/feature-compatibility.xml b/org.eclipse.mylyn-feature/feature-compatibility.xml
deleted file mode 100644
index 5b2184d2c..000000000
--- a/org.eclipse.mylyn-feature/feature-compatibility.xml
+++ /dev/null
@@ -1,469 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2009 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
- -->
-
-<feature
- id="org.eclipse.mylyn_feature"
- label="Mylyn Task List (Required)"
- version="2.0.0.v20070706-2000"
- provider-name="Eclipse.org"
- plugin="org.eclipse.mylyn">
-
- <description url="http://eclipse.org/mylyn">
- Provides the Task List for task and time management.
- </description>
-
- <copyright>
- Copyright (c) 2004 - 2007 Mylyn project committers and others.
- </copyright>
-
- <license url="http://www.eclipse.org/legal/epl-v10.html">
- Eclipse Public License - v 1.0
-THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
-ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
-DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE
-OF THIS AGREEMENT.
-1. DEFINITIONS
-&quot;Contribution&quot; means:
-a) in the case of the initial Contributor, the initial code and
-documentation distributed under this Agreement, and
-b) in the case of each subsequent Contributor:
-i) changes to the Program, and
-ii) additions to the Program;
-where such changes and/or additions to the Program originate
-from and are distributed by that particular Contributor. A Contribution
-&apos;originates&apos; from a Contributor if it was added to the Program
-by such Contributor itself or anyone acting on such Contributor&apos;s
-behalf. Contributions do not include additions to the Program
-which: (i) are separate modules of software distributed in conjunction
-with the Program under their own license agreement, and (ii)
-are not derivative works of the Program.
-&quot;Contributor&quot; means any person or entity that distributes the
-Program.
-&quot;Licensed Patents &quot; mean patent claims licensable by a Contributor
-which are necessarily infringed by the use or sale of its Contribution
-alone or when combined with the Program.
-&quot;Program&quot; means the Contributions distributed in accordance with
-this Agreement.
-&quot;Recipient&quot; means anyone who receives the Program under this
-Agreement, including all Contributors.
-2. GRANT OF RIGHTS
-a) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free copyright
-license to reproduce, prepare derivative works of, publicly display,
-publicly perform, distribute and sublicense the Contribution
-of such Contributor, if any, and such derivative works, in source
-code and object code form.
-b) Subject to the terms of this Agreement, each Contributor hereby
-grants Recipient a non-exclusive, worldwide, royalty-free patent
-license under Licensed Patents to make, use, sell, offer to sell,
-import and otherwise transfer the Contribution of such Contributor,
-if any, in source code and object code form. This patent license
-shall apply to the combination of the Contribution and the Program
-if, at the time the Contribution is added by the Contributor,
-such addition of the Contribution causes such combination to
-be covered by the Licensed Patents. The patent license shall
-not apply to any other combinations which include the Contribution.
-No hardware per se is licensed hereunder.
-c) Recipient understands that although each Contributor grants
-the licenses to its Contributions set forth herein, no assurances
-are provided by any Contributor that the Program does not infringe
-the patent or other intellectual property rights of any other
-entity. Each Contributor disclaims any liability to Recipient
-for claims brought by any other entity based on infringement
-of intellectual property rights or otherwise. As a condition
-to exercising the rights and licenses granted hereunder, each
-Recipient hereby assumes sole responsibility to secure any other
-intellectual property rights needed, if any. For example, if
-a third party patent license is required to allow Recipient to
-distribute the Program, it is Recipient&apos;s responsibility to acquire
-that license before distributing the Program.
-d) Each Contributor represents that to its knowledge it has sufficient
-copyright rights in its Contribution, if any, to grant the copyright
-license set forth in this Agreement.
-3. REQUIREMENTS
-A Contributor may choose to distribute the Program in object
-code form under its own license agreement, provided that:
-a) it complies with the terms and conditions of this Agreement;
-and
-b) its license agreement:
-i) effectively disclaims on behalf of all Contributors all warranties
-and conditions, express and implied, including warranties or
-conditions of title and non-infringement, and implied warranties
-or conditions of merchantability and fitness for a particular
-purpose;
-ii) effectively excludes on behalf of all Contributors all liability
-for damages, including direct, indirect, special, incidental
-and consequential damages, such as lost profits;
-iii) states that any provisions which differ from this Agreement
-are offered by that Contributor alone and not by any other party;
-and
-iv) states that source code for the Program is available from
-such Contributor, and informs licensees how to obtain it in a
-reasonable manner on or through a medium customarily used for
-software exchange.
-When the Program is made available in source code form:
-a) it must be made available under this Agreement; and
-b) a copy of this Agreement must be included with each copy of
-the Program.
-Contributors may not remove or alter any copyright notices contained
-within the Program.
-Each Contributor must identify itself as the originator of its
-Contribution, if any, in a manner that reasonably allows subsequent
-Recipients to identify the originator of the Contribution.
-4. COMMERCIAL DISTRIBUTION
-Commercial distributors of software may accept certain responsibilities
-with respect to end users, business partners and the like. While
-this license is intended to facilitate the commercial use of
-the Program, the Contributor who includes the Program in a commercial
-product offering should do so in a manner which does not create
-potential liability for other Contributors. Therefore, if a Contributor
-includes the Program in a commercial product offering, such Contributor
-(&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify
-every other Contributor (&quot;Indemnified Contributor&quot;) against any
-losses, damages and costs (collectively &quot;Losses&quot;) arising from
-claims, lawsuits and other legal actions brought by a third party
-against the Indemnified Contributor to the extent caused by the
-acts or omissions of such Commercial Contributor in connection
-with its distribution of the Program in a commercial product
-offering. The obligations in this section do not apply to any
-claims or Losses relating to any actual or alleged intellectual
-property infringement. In order to qualify, an Indemnified Contributor
-must: a) promptly notify the Commercial Contributor in writing
-of such claim, and b) allow the Commercial Contributor to control,
-and cooperate with the Commercial Contributor in, the defense
-and any related settlement negotiations. The Indemnified Contributor
-may participate in any such claim at its own expense.
-For example, a Contributor might include the Program in a commercial
-product offering, Product X. That Contributor is then a Commercial
-Contributor. If that Commercial Contributor then makes performance
-claims, or offers warranties related to Product X, those performance
-claims and warranties are such Commercial Contributor&apos;s responsibility
-alone. Under this section, the Commercial Contributor would have
-to defend claims against the other Contributors related to those
-performance claims and warranties, and if a court requires any
-other Contributor to pay any damages as a result, the Commercial
-Contributor must pay those damages.
-5. NO WARRANTY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
-IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
-OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
-ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
-OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
-responsible for determining the appropriateness of using and
-distributing the Program and assumes all risks associated with
-its exercise of rights under this Agreement , including but not
-limited to the risks and costs of program errors, compliance
-with applicable laws, damage to or loss of data, programs or
-equipment, and unavailability or interruption of operations.
-6. DISCLAIMER OF LIABILITY
-EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
-NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
-OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
-OF SUCH DAMAGES.
-7. GENERAL
-If any provision of this Agreement is invalid or unenforceable
-under applicable law, it shall not affect the validity or enforceability
-of the remainder of the terms of this Agreement, and without
-further action by the parties hereto, such provision shall be
-reformed to the minimum extent necessary to make such provision
-valid and enforceable.
-If Recipient institutes patent litigation against any entity
-(including a cross-claim or counterclaim in a lawsuit) alleging
-that the Program itself (excluding combinations of the Program
-with other software or hardware) infringes such Recipient&apos;s patent(s),
-then such Recipient&apos;s rights granted under Section 2(b) shall
-terminate as of the date such litigation is filed.
-All Recipient&apos;s rights under this Agreement shall terminate if
-it fails to comply with any of the material terms or conditions
-of this Agreement and does not cure such failure in a reasonable
-period of time after becoming aware of such noncompliance. If
-all Recipient&apos;s rights under this Agreement terminate, Recipient
-agrees to cease use and distribution of the Program as soon as
-reasonably practicable. However, Recipient&apos;s obligations under
-this Agreement and any licenses granted by Recipient relating
-to the Program shall continue and survive.
-Everyone is permitted to copy and distribute copies of this Agreement,
-but in order to avoid inconsistency the Agreement is copyrighted
-and may only be modified in the following manner. The Agreement
-Steward reserves the right to publish new versions (including
-revisions) of this Agreement from time to time. No one other
-than the Agreement Steward has the right to modify this Agreement.
-The Eclipse Foundation is the initial Agreement Steward. The
-Eclipse Foundation may assign the responsibility to serve as
-the Agreement Steward to a suitable separate entity. Each new
-version of the Agreement will be given a distinguishing version
-number. The Program (including Contributions) may always be distributed
-subject to the version of the Agreement under which it was received.
-In addition, after a new version of the Agreement is published,
-Contributor may elect to distribute the Program (including its
-Contributions) under the new version. Except as expressly stated
-in Sections 2(a) and 2(b) above, Recipient receives no rights
-or licenses to the intellectual property of any Contributor under
-this Agreement, whether expressly, by implication, estoppel or
-otherwise. All rights in the Program not expressly granted under
-this Agreement are reserved.
-This Agreement is governed by the laws of the State of New York
-and the intellectual property laws of the United States of America.
-No party to this Agreement will bring a legal action under this
-Agreement more than one year after the cause of action arose.
-Each party waives its rights to a jury trial in any resulting
-litigation.
- </license>
-
- <url>
- <update label="Mylyn for Eclipse 3.3" url="http://download.eclipse.org/tools/mylyn/update/e3.3"/>
- <discovery label="Mylyn Extras" url="http://download.eclipse.org/tools/mylyn/update/extras"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.ui" version="3.3.0.I20070503" match="greaterOrEqual"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.mylyn.tasks.core"/>
- <import plugin="org.eclipse.mylyn.tasks.ui"/>
- <import plugin="org.eclipse.mylyn"/>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.ui.cheatsheets"/>
- <import plugin="org.eclipse.ui.intro"/>
- <import plugin="org.eclipse.help.webapp"/>
- <import plugin="org.eclipse.mylyn.monitor.core"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.mylyn.context.core"/>
- <import plugin="org.eclipse.update.core"/>
- <import plugin="org.eclipse.ui.browser"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.mylyn.monitor.ui"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.ui.net"/>
- <import plugin="org.eclipse.mylyn.web.core"/>
- <import plugin="org.eclipse.core.net"/>
- <import plugin="org.eclipse.mylar" version="2.0.0.v20070614-1800"/>
- </requires>
-
- <plugin
- id="org.eclipse.mylyn.help.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.context.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.web.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.bugzilla.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.bugzilla.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.context.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.context.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.doc"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.ide"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.java"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.jira.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.jira.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.monitor.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.monitor.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.monitor.usage"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.resources"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.tasks.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.tasks.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.tasks.web"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.team"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.trac.core"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.trac.ui"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylar.web"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070615-compatibility"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.compatibility"
- download-size="0"
- install-size="0"
- version="2.0.0.v20070706-2000"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.mylyn-feature/feature.properties b/org.eclipse.mylyn-feature/feature.properties
deleted file mode 100644
index 3bb0caa3a..000000000
--- a/org.eclipse.mylyn-feature/feature.properties
+++ /dev/null
@@ -1,62 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-featureName=Mylyn Task List (Required)
-description=Provides the Task List for task and time management.
-providerName=Eclipse Mylyn
-copyright=Copyright (c) 2004, 2009 Tasktop Technologies and others. All rights reserved.
-updateSiteName=Mylyn for Eclipse 3.4
-discovery_Mylyn_Extras=Mylyn Extras
-discovery_Mylyn=Mylyn
-license=\
-Eclipse Foundation Software User Agreement\n\
-March 17, 2005\n\
-\n\
-Usage Of Content\n\
-\n\
-THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
-\n\
-Applicable Licenses\n\
-\n\
-Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, "Program" will mean the Content.\n\
-\n\
-Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS modules ("Modules") and made available as downloadable archives ("Downloads").\n\
-\n\
- * Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").\n\
- * Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java\u2122 ARchive) in a directory named "plugins".\n\
- * A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
- * Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
-\n\
-The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module including, but not limited to the following locations:\n\
-\n\
- * The top-level (root) directory\n\
- * Plug-in and Fragment directories\n\
- * Inside Plug-ins and Fragments packaged as JARs\n\
- * Sub-directories of the directory named "src" of certain Plug-ins\n\
- * Feature directories\n\
-\n\
-Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in that directory.\n\
-\n\
-THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
-\n\
- * Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
- * Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
- * Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0\n\)
- * IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\
- * Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
- * Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
-\n\
-IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.\n\
-\n\
-Cryptography\n\
-\n\
-Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to another country, of encryption software. BEFORE using any encryption software, please check the country&apos;s laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.\n\
-\n\
-Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
diff --git a/org.eclipse.mylyn-feature/feature.xml b/org.eclipse.mylyn-feature/feature.xml
deleted file mode 100644
index 50e09ab0b..000000000
--- a/org.eclipse.mylyn-feature/feature.xml
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><!--
- Copyright (c) 2009 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
- -->
-
-<feature
- id="org.eclipse.mylyn_feature"
- label="%featureName"
- version="3.2.2.qualifier"
- provider-name="%providerName"
- plugin="org.eclipse.mylyn">
-
- <description url="http://eclipse.org/mylyn">
- %description
- </description>
-
- <copyright>
- %copyright
- </copyright>
-
- <license url="license.html">
- %license
- </license>
-
- <url>
- <update label="%updateSiteName" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
- <discovery label="%discovery_Mylyn_Extras" url="http://download.eclipse.org/tools/mylyn/update/extras"/>
- <discovery label="%discovery_Mylyn" url="http://download.eclipse.org/tools/mylyn/update/e3.4"/>
- </url>
-
- <requires>
- <import plugin="org.eclipse.core.runtime"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.ui" version="3.4.0.I20070918" match="greaterOrEqual"/>
- <import plugin="org.eclipse.compare"/>
- <import plugin="org.eclipse.core.expressions"/>
- <import plugin="org.eclipse.core.net"/>
- <import plugin="org.eclipse.core.resources"/>
- <import plugin="org.eclipse.jface.text"/>
- <import plugin="org.eclipse.search"/>
- <import plugin="org.eclipse.ui.browser"/>
- <import plugin="org.eclipse.ui.editors"/>
- <import plugin="org.eclipse.ui.forms"/>
- <import plugin="org.eclipse.ui.ide"/>
- <import plugin="org.eclipse.ui.views"/>
- <import plugin="org.eclipse.ui.workbench.texteditor"/>
- <import plugin="org.eclipse.mylyn.context.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.monitor.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.tasks.core" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.net" version="3.0.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.ui" version="3.0.0" match="compatible"/>
- <import plugin="org.apache.commons.logging" version="1.0.4" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.codec" version="1.3.0" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.httpclient" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.apache.commons.lang" version="2.3.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.core.runtime" version="3.3.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.1.0" match="greaterOrEqual"/>
- <import plugin="org.eclipse.mylyn.commons.net" version="3.1.0" match="greaterOrEqual"/>
- <import feature="org.eclipse.rcp" version="3.4.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.discovery.core" version="3.2.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.core" version="3.2.0" match="compatible"/>
- <import plugin="org.eclipse.mylyn.commons.ui" version="3.2.0" match="compatible"/>
- </requires>
-
- <plugin
- id="org.eclipse.mylyn"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.context.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.tasks.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.monitor.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.compatibility"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.logging"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.codec"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.httpclient"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.apache.commons.lang"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.commons.net"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.discovery.core"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.mylyn.discovery.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
diff --git a/org.eclipse.mylyn-feature/license.html b/org.eclipse.mylyn-feature/license.html
deleted file mode 100644
index 15a10cfd3..000000000
--- a/org.eclipse.mylyn-feature/license.html
+++ /dev/null
@@ -1,79 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
-<html>
-<head>
-<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
-<title>Eclipse.org Software User Agreement</title>
-</head>
-
-<body lang="EN-US" link=blue vlink=purple>
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>March 17, 2005</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation 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 provided with this Content and is also 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>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS
- modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>IBM Public License 1.0 (available at <a href="http://oss.software.ibm.com/developerworks/opensource/license10.html">http://oss.software.ibm.com/developerworks/opensource/license10.html</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<small>Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.</small>
-</body>
-</html>
diff --git a/org.eclipse.mylyn.bugzilla.core/.classpath b/org.eclipse.mylyn.bugzilla.core/.classpath
deleted file mode 100644
index 6fe19812c..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.classpath
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
- <accessrules>
- <accessrule kind="nonaccessible" pattern="**/System"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
- <accessrules>
- <accessrule kind="nonaccessible" pattern="com/sun/**"/>
- </accessrules>
- </classpathentry>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/org.eclipse.mylyn.bugzilla.core/.cvsignore b/org.eclipse.mylyn.bugzilla.core/.cvsignore
deleted file mode 100644
index bc8b2d4cb..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-bin
-bugzilla.jar
-doc.zip
diff --git a/org.eclipse.mylyn.bugzilla.core/.project b/org.eclipse.mylyn.bugzilla.core/.project
deleted file mode 100644
index ffdfd20f4..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.project
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.mylyn.bugzilla.core</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.bugzilla.core/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index fbac23913..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,342 +0,0 @@
-#Tue May 12 20:42:44 PDT 2009
-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.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.problem.annotationSuperInterface=warning
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
-org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
-org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
-org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-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.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.missingDeprecatedAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
-org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
-org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
-org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
-org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
-org.eclipse.jdt.core.compiler.problem.nullReference=error
-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.rawTypeReference=warning
-org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
-org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
-org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
-org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
-org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
-org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
-org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=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.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.unusedWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
-org.eclipse.jdt.core.compiler.source=1.5
-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_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=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.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.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.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_tabs_only_for_leading_indentations=false
-org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
diff --git a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
deleted file mode 100644
index de64fe6c3..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.jdt.ui.prefs
+++ /dev/null
@@ -1,63 +0,0 @@
-#Thu Sep 11 16:27:18 PDT 2008
-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=11
-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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * @author ${user}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\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">/*******************************************************************************\r\n * Copyright (c) 2009 Tasktop Technologies and others.\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http\://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors\:\r\n * Tasktop Technologies - initial API and implementation\r\n *******************************************************************************/\r\n\r\n${package_declaration}\r\n\r\n${typecomment}\r\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">\r\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">\r\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">\r\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">\r\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\r\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\r\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}\r\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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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">/**\r\n * @return the ${bare_field_name}\r\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">/**\r\n * @param ${param} the ${bare_field_name} to set\r\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">/**\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\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">/**\r\n * \r\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">/**\r\n * ${tags}\r\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)\r\n * ${see_to_overridden}\r\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">/**\r\n * ${tags}\r\n * ${see_to_target}\r\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}\r\n${package_declaration}\r\n\r\n${typecomment}\r\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">\r\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">\r\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">\r\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">\r\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\r\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\r\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}\r\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.bugzilla.core/.settings/org.eclipse.ltk.core.refactoring.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.ltk.core.refactoring.prefs
deleted file mode 100644
index 7ab03bdac..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.ltk.core.refactoring.prefs
+++ /dev/null
@@ -1,3 +0,0 @@
-#Fri Jun 02 15:30:09 PDT 2006
-eclipse.preferences.version=1
-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=true
diff --git a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasks.ui.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
deleted file mode 100644
index d8c6d26af..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.mylyn.tasks.ui.prefs
+++ /dev/null
@@ -1,4 +0,0 @@
-#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.bugzilla.core/.settings/org.eclipse.pde.prefs b/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.pde.prefs
deleted file mode 100644
index e8f2d5620..000000000
--- a/org.eclipse.mylyn.bugzilla.core/.settings/org.eclipse.pde.prefs
+++ /dev/null
@@ -1,18 +0,0 @@
-#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.bugzilla.core/META-INF/MANIFEST.MF b/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
deleted file mode 100644
index 001b15bdf..000000000
--- a/org.eclipse.mylyn.bugzilla.core/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.core;singleton:=true
-Bundle-Version: 3.2.2.qualifier
-Bundle-Activator: org.eclipse.mylyn.internal.bugzilla.core.BugzillaCorePlugin
-Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.mylyn.tasks.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.net;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.mylyn.commons.core;bundle-version="[3.0.0,4.0.0)",
- org.eclipse.core.net
-Bundle-ActivationPolicy: lazy
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ClassPath: .
-Export-Package: org.eclipse.mylyn.internal.bugzilla.core;x-friends:="org.eclipse.mylyn.bugzilla.ide,org.eclipse.mylyn.bugzilla.ui",
- org.eclipse.mylyn.internal.bugzilla.core.history;x-friends:="org.eclipse.mylyn.bugzilla.ide,org.eclipse.mylyn.bugzilla.ui"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-Localization: plugin
diff --git a/org.eclipse.mylyn.bugzilla.core/about.html b/org.eclipse.mylyn.bugzilla.core/about.html
deleted file mode 100644
index d774b07c7..000000000
--- a/org.eclipse.mylyn.bugzilla.core/about.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!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.bugzilla.core/build-user.xml b/org.eclipse.mylyn.bugzilla.core/build-user.xml
deleted file mode 100644
index a28fbfcd1..000000000
--- a/org.eclipse.mylyn.bugzilla.core/build-user.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-<!--
- Copyright (c) 2009 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
- -->
-<target name="help">
- <echo message="Please run: $ ant -v -projecthelp"/>
-</target> \ No newline at end of file
diff --git a/org.eclipse.mylyn.bugzilla.core/build.properties b/org.eclipse.mylyn.bugzilla.core/build.properties
deleted file mode 100644
index 0130a60da..000000000
--- a/org.eclipse.mylyn.bugzilla.core/build.properties
+++ /dev/null
@@ -1,16 +0,0 @@
-###############################################################################
-# Copyright (c) 2004, 2008 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
-###############################################################################
-
-bin.includes = META-INF/,\
- about.html,\
- .,\
- plugin.xml,\
- plugin.properties
-src.includes = about.html
-jre.compilation.profile = J2SE-1.5
-source.. = src/
diff --git a/org.eclipse.mylyn.bugzilla.core/plugin.properties b/org.eclipse.mylyn.bugzilla.core/plugin.properties
deleted file mode 100644
index c5952f978..000000000
--- a/org.eclipse.mylyn.bugzilla.core/plugin.properties
+++ /dev/null
@@ -1,13 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-#Properties file for org.eclipse.mylyn.bugzilla.core
-Bundle-Vendor = Eclipse Mylyn
-Bundle-Name = Mylyn Bugzilla Connector Core
diff --git a/org.eclipse.mylyn.bugzilla.core/plugin.xml b/org.eclipse.mylyn.bugzilla.core/plugin.xml
deleted file mode 100644
index 4e1d101ca..000000000
--- a/org.eclipse.mylyn.bugzilla.core/plugin.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.0"?><!--
- Copyright (c) 2009 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
- -->
-
-<plugin>
- <extension-point id="languages" name="languages" schema="schema/languages.exsd"/>
-<!--<extension
- point="org.eclipse.mylyn.tasks.ui.duplicateDetectors">
- <detector
- class="org.eclipse.mylyn.internal.bugzilla.core.BugzillaStackTraceDuplicateDetector"
- kind="bugzilla"
- name="Stack Trace">
- </detector>
- </extension>-->
-</plugin>
diff --git a/org.eclipse.mylyn.bugzilla.core/schema/languages.exsd b/org.eclipse.mylyn.bugzilla.core/schema/languages.exsd
deleted file mode 100644
index d175012e6..000000000
--- a/org.eclipse.mylyn.bugzilla.core/schema/languages.exsd
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.eclipse.mylyn.bugzilla.core">
-<annotation>
- <appInfo>
- <meta.schema plugin="org.eclipse.mylyn.bugzilla.core" id="languages" name="languages"/>
- </appInfo>
- <documentation>
- [Enter description of this extension point.]
- </documentation>
- </annotation>
-
- <element name="extension">
- <complexType>
- <sequence>
- <element ref="language" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appInfo>
- <meta.attribute translatable="true"/>
- </appInfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="language">
- <complexType>
- <sequence>
- <element ref="languageAttribute" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
- <attribute name="name" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="languageAttribute">
- <complexType>
- <attribute name="command" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="response" type="string" use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appInfo>
- <meta.section type="since"/>
- </appInfo>
- <documentation>
- [Enter the first release in which this extension point appears.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="examples"/>
- </appInfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="apiInfo"/>
- </appInfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appInfo>
- <meta.section type="implementation"/>
- </appInfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
-
-</schema>
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
deleted file mode 100644
index ed09f5585..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/AbstractReportFactory.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.BufferedInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-import java.io.StringReader;
-import java.security.GeneralSecurityException;
-
-import org.xml.sax.EntityResolver;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.DefaultHandler;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * @author Rob Elves
- */
-public class AbstractReportFactory {
-
- public static final int RETURN_ALL_HITS = -1;
-
- private final InputStream inStream;
-
- private final String characterEncoding;
-
- public AbstractReportFactory(InputStream inStream, String encoding) {
- this.inStream = inStream;
- this.characterEncoding = encoding;
- }
-
- /**
- * expects rdf returned from repository (ctype=rdf in url)
- *
- * @throws GeneralSecurityException
- */
- protected void collectResults(DefaultHandler contentHandler, boolean clean) throws IOException {
- File tempFile = null;
-
- if (inStream == null) {
- return;
- }
-
- final BufferedInputStream is = new BufferedInputStream(inStream, 1024);
-
- InputStream iis = new InputStream() {
- @SuppressWarnings( { "restriction" })
- @Override
- public int read() throws IOException {
- int c;
- while ((c = is.read()) != -1) {
- if (org.eclipse.mylyn.internal.commons.core.XmlStringConverter.isValid((char) c)) {
- return c;
- }
- }
- return -1;
- }
- };
-
- Reader in;
- if (characterEncoding != null) {
- in = new InputStreamReader(iis, characterEncoding);
- } else {
- in = new InputStreamReader(iis);
- }
-
- if (clean) {
- tempFile = File.createTempFile("XmlCleaner-", "tmp"); //$NON-NLS-1$//$NON-NLS-2$
- tempFile.deleteOnExit();
- in = XmlCleaner.clean(in, tempFile);
- }
-
- try {
- final XMLReader reader = XMLReaderFactory.createXMLReader();
- reader.setFeature("http://xml.org/sax/features/validation", false); //$NON-NLS-1$
- reader.setContentHandler(contentHandler);
-
- EntityResolver resolver = new EntityResolver() {
-
- public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException {
- // The default resolver will try to resolve the dtd via
- // URLConnection. Since we
- // don't have need of entity resolving
- // currently, we just supply a dummy (empty) resource for
- // each request...
- InputSource source = new InputSource();
- source.setCharacterStream(new StringReader("")); //$NON-NLS-1$
- return source;
- }
- };
-
- reader.setEntityResolver(resolver);
- reader.setErrorHandler(new ErrorHandler() {
-
- public void error(SAXParseException exception) throws SAXException {
- throw exception;
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- throw exception;
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- throw exception;
- }
- });
- reader.parse(new InputSource(in));
- } catch (SAXException e) {
- throw new IOException(e.getMessage());
- }
-
- finally {
- if (tempFile != null) {
- tempFile.delete();
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentMapper.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentMapper.java
deleted file mode 100644
index eac7fdbd1..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttachmentMapper.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaAttachmentMapper extends TaskAttachmentMapper {
- private String token;
-
- public String getToken() {
- return token;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- @Override
- public void applyTo(TaskAttribute taskAttribute) {
- // ignore
- super.applyTo(taskAttribute);
-
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
-
- if (getToken() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute(BugzillaAttribute.TOKEN.getKey());
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getToken());
- }
-
- }
-
- public static BugzillaAttachmentMapper createFrom(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskAttributeMapper mapper = taskAttribute.getTaskData().getAttributeMapper();
- BugzillaAttachmentMapper attachment = new BugzillaAttachmentMapper();
- attachment.setAttachmentId(mapper.getValue(taskAttribute));
- TaskAttribute child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_AUTHOR);
- if (child != null) {
- attachment.setAuthor(mapper.getRepositoryPerson(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_CONTENT_TYPE);
- if (child != null) {
- attachment.setContentType(mapper.getValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_DATE);
- if (child != null) {
- attachment.setCreationDate(mapper.getDateValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_DESCRIPTION);
- if (child != null) {
- attachment.setDescription(mapper.getValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_FILENAME);
- if (child != null) {
- attachment.setFileName(mapper.getValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_DEPRECATED);
- if (child != null) {
- attachment.setDeprecated(mapper.getBooleanValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_PATCH);
- if (child != null) {
- attachment.setPatch(mapper.getBooleanValue(child));
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_SIZE);
- if (child != null) {
- Long value = mapper.getLongValue(child);
- if (value != null) {
- attachment.setLength(value);
- }
- }
- child = taskAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_URL);
- if (child != null) {
- attachment.setUrl(mapper.getValue(child));
- }
- child = taskAttribute.getMappedAttribute(BugzillaAttribute.TOKEN.getKey());
- if (child != null) {
- attachment.setToken(mapper.getValue(child));
- }
- return attachment;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
deleted file mode 100644
index 3d6efc57f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttribute.java
+++ /dev/null
@@ -1,233 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Rob Elves
- */
-public enum BugzillaAttribute {
-
- STATUS_WHITEBOARD(Messages.BugzillaAttribute_Status_Whiteboard,
- "status_whiteboard", TaskAttribute.TYPE_LONG_RICH_TEXT, false, false), //$NON-NLS-1$
-
- ACTUAL_TIME(Messages.BugzillaAttribute_Worked, "actual_time", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
-
- ADD_COMMENT(Messages.BugzillaAttribute_Additional_Comments, "comment", TaskAttribute.TYPE_LONG_TEXT, true, false), //$NON-NLS-1$
-
- ASSIGNED_TO(Messages.BugzillaAttribute_Assigned_to, "assigned_to", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
-
- ASSIGNED_TO_NAME(Messages.BugzillaAttribute_Assigned_to_NAME,
- "assigned_to_name", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
-
- ATTACHID(Messages.BugzillaAttribute_ATTACH_ID, "attachid", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- ATTACHMENT(Messages.BugzillaAttribute_attachment, "attachment", TaskAttribute.TYPE_ATTACHMENT, false, false), //$NON-NLS-1$
-
- BLOCKED(Messages.BugzillaAttribute_Blocks, "blocked", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false), //$NON-NLS-1$
-
- BUG(Messages.BugzillaAttribute_bug, "bug", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- BUG_FILE_LOC(Messages.BugzillaAttribute_URL, "bug_file_loc", TaskAttribute.TYPE_URL, false, false), //$NON-NLS-1$
-
- BUG_ID(Messages.BugzillaAttribute_Bug_ID, "bug_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- BUG_SEVERITY(Messages.BugzillaAttribute_Severity, "bug_severity", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- BUG_STATUS(Messages.BugzillaAttribute_Status, "bug_status", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
-
- BUG_WHEN(Messages.BugzillaAttribute_bug_when, "bug_when", TaskAttribute.TYPE_DATE, true, true), //$NON-NLS-1$
-
- BUGZILLA(Messages.BugzillaAttribute_bugzilla, "bugzilla", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- CC(Messages.BugzillaAttribute_CC, "cc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true), //$NON-NLS-1$
-
- REMOVECC(Messages.BugzillaAttribute_Remove_CC, "removecc", IBugzillaConstants.EDITOR_TYPE_REMOVECC, true, true), //$NON-NLS-1$
-
- CCLIST_ACCESSIBLE(Messages.BugzillaAttribute_CC_List, "cclist_accessible", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
-
- CLASSIFICATION(Messages.BugzillaAttribute_Classification,
- "classification", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- CLASSIFICATION_ID(Messages.BugzillaAttribute_Classification_ID,
- "classification_id", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- COMPONENT(Messages.BugzillaAttribute_Component, "component", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- CONFIRM_PRODUCT_CHANGE("confirm_product_change", "confirm_product_change", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$ //$NON-NLS-2$
-
- CREATION_TS(Messages.BugzillaAttribute_Opened, "creation_ts", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
-
- CTYPE(Messages.BugzillaAttribute_Content_Type, "ctype", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- DATA(Messages.BugzillaAttribute_data, "data", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- DATE(Messages.BugzillaAttribute_Date, "date", TaskAttribute.TYPE_DATE, false, false), //$NON-NLS-1$
-
- DEADLINE(Messages.BugzillaAttribute_Due, "deadline", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
-
- DELTA_TS(Messages.BugzillaAttribute_Modified, "delta_ts", TaskAttribute.TYPE_DATE, true, false), //$NON-NLS-1$
-
- DEPENDSON(Messages.BugzillaAttribute_Depends_on__Subtasks_,
- "dependson", TaskAttribute.TYPE_TASK_DEPENDENCY, false, false), //$NON-NLS-1$
-
- DESC(Messages.BugzillaAttribute_desc, "desc", TaskAttribute.TYPE_LONG_TEXT, true, true), //$NON-NLS-1$
-
- EVERCONFIRMED(Messages.BugzillaAttribute_everconfirmed, "everconfirmed", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
-
- ESTIMATED_TIME(Messages.BugzillaAttribute_Estimated_Time,
- "estimated_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- FILENAME(Messages.BugzillaAttribute_filename, "filename", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- FLAG(Messages.BugzillaAttribute_flag, "flag", IBugzillaConstants.EDITOR_TYPE_FLAG, false, false), //$NON-NLS-1$
-
- GROUP(Messages.BugzillaAttribute_Group, "group", TaskAttribute.TYPE_BOOLEAN, true, true), //$NON-NLS-1$
-
- IS_OBSOLETE(Messages.BugzillaAttribute_Obsolete, "isobsolete", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
-
- IS_PATCH(Messages.BugzillaAttribute_Patch, "ispatch", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
-
- KEYWORDS(Messages.BugzillaAttribute_Keywords, "keywords", IBugzillaConstants.EDITOR_TYPE_KEYWORDS, false, false), //$NON-NLS-1$
-
- LONG_DESC(Messages.BugzillaAttribute_Description, "long_desc", TaskAttribute.TYPE_LONG_RICH_TEXT, true, true), //$NON-NLS-1$
-
- LONGDESCLENGTH(Messages.BugzillaAttribute_Number_of_comments,
- "longdesclength", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- NEWCC(Messages.BugzillaAttribute_Add_CC, "newcc", TaskAttribute.TYPE_PERSON, true, false), //$NON-NLS-1$
-
- OP_SYS(Messages.BugzillaAttribute_OS, "op_sys", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- PRIORITY(Messages.BugzillaAttribute_Priority, "priority", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- PRODUCT(Messages.BugzillaAttribute_Product, "product", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- REP_PLATFORM(Messages.BugzillaAttribute_Platform, "rep_platform", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- REPORTER(Messages.BugzillaAttribute_Reporter, "reporter", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
-
- REPORTER_NAME(Messages.BugzillaAttribute_REPORT_NAME, "reporter_name", TaskAttribute.TYPE_PERSON, true, true), //$NON-NLS-1$
-
- REPORTER_ACCESSIBLE(Messages.BugzillaAttribute_REPORT_ACCESSIBLE, "reporter_accessible", //$NON-NLS-1$
- TaskAttribute.TYPE_BOOLEAN, true, false),
-
- RESOLUTION(Messages.BugzillaAttribute_Resolution, "resolution", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
-
- REMAINING_TIME(Messages.BugzillaAttribute_Remaining, "remaining_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- SET_DEFAULT_ASSIGNEE(Messages.BugzillaAttribute_Reassign_to_default_assignee,
- "set_default_assignee", TaskAttribute.TYPE_BOOLEAN, true, //$NON-NLS-1$
- false),
-
- SHORT_DESC(Messages.BugzillaAttribute_Summary, "short_desc", TaskAttribute.TYPE_SHORT_RICH_TEXT, true, false), //$NON-NLS-1$
-
- SIZE(Messages.BugzillaAttribute_Size, "size", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- TARGET_MILESTONE(Messages.BugzillaAttribute_Target_milestone,
- "target_milestone", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- THETEXT(Messages.BugzillaAttribute_thetext, "thetext", TaskAttribute.TYPE_SHORT_TEXT, false, true), //$NON-NLS-1$
-
- TYPE(Messages.BugzillaAttribute_type, "type", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- UNKNOWN(Messages.BugzillaAttribute_UNKNOWN, "UNKNOWN", TaskAttribute.TYPE_SHORT_TEXT, false, false), //$NON-NLS-1$
-
- VERSION(Messages.BugzillaAttribute_Version, "version", TaskAttribute.TYPE_SINGLE_SELECT, false, false), //$NON-NLS-1$
-
- INSTALL_VERSION(Messages.BugzillaAttribute_version_of_bugzilla_installed, "install_version", null, true, false), //$NON-NLS-1$
-
- VOTES(Messages.BugzillaAttribute_Votes, "votes", IBugzillaConstants.EDITOR_TYPE_VOTES, false, true), //$NON-NLS-1$
-
- WORK_TIME(Messages.BugzillaAttribute_Add, "work_time", TaskAttribute.TYPE_SHORT_TEXT, true, false), //$NON-NLS-1$
-
- WHO(Messages.BugzillaAttribute_who, "who", TaskAttribute.TYPE_PERSON, false, false), //$NON-NLS-1$
-
- WHO_NAME(Messages.BugzillaAttribute_who_name, "who_name", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
-
- QA_CONTACT(Messages.BugzillaAttribute_QA_Contact, "qa_contact", TaskAttribute.TYPE_PERSON, true, false), //$NON-NLS-1$
-
- QA_CONTACT_NAME(Messages.BugzillaAttribute_QA_Contact_NAME,
- "qa_contact_name", TaskAttribute.TYPE_SHORT_TEXT, true, true), //$NON-NLS-1$
-
- ADDSELFCC(Messages.BugzillaAttribute_Add_self_to_CC, "addselfcc", TaskAttribute.TYPE_BOOLEAN, true, false), //$NON-NLS-1$
-
- STATUS_OPEN(Messages.BugzillaAttribute_open_status_values, "status_open", null, true, true), //$NON-NLS-1$
-
- NEW_COMMENT(Messages.BugzillaAttribute_new_comment, "new_comment", TaskAttribute.TYPE_LONG_RICH_TEXT, true, false), //$NON-NLS-1$
-
- TOKEN("token", "token", null, true, true), //$NON-NLS-1$ //$NON-NLS-2$
-
- // Used by search engine
- LI(Messages.BugzillaAttribute_used_by_search_engine_li, "li", null, true, false), //$NON-NLS-1$
-
- ID(Messages.BugzillaAttribute_used_by_search_engine_id, "id", null, true, false), //$NON-NLS-1$
-
- SHORT_SHORT_DESC(Messages.BugzillaAttribute_used_by_search_engine_desc, "short_short_desc", null, false, false), //$NON-NLS-1$
-
- SEQ(Messages.BugzillaAttribute_used_by_search_engine_seq, "seq", null, false, false), //$NON-NLS-1$
-
- RESULT(Messages.BugzillaAttribute_used_by_search_engine_result, "result", null, false, false), //$NON-NLS-1$
-
- RDF(Messages.BugzillaAttribute_used_by_search_engine_rdf, "rdf", null, false, false), //$NON-NLS-1$
-
- INSTALLATION(Messages.BugzillaAttribute_used_by_search_engine_installation, "installation", null, false, false), //$NON-NLS-1$
-
- BUGS(Messages.BugzillaAttribute_used_by_search_engine_bugs, "bugs", null, false, false); //$NON-NLS-1$
-
- private final boolean isHidden;
-
- private final boolean isReadOnly;
-
- private final String keyString;
-
- private final String prettyName;
-
- private final String type;
-
- public static final BugzillaAttribute[] EXTENDED_ATTRIBUTES = { DELTA_TS, BUG_SEVERITY, PRODUCT };
-
- BugzillaAttribute(String prettyName, String idKey, String type, boolean hidden, boolean readonly) {
- this.prettyName = prettyName;
- this.keyString = idKey;
- this.type = type;
- this.isHidden = hidden;
- this.isReadOnly = readonly;
- }
-
- public String getKey() {
- return keyString;
- }
-
- public boolean isHidden() {
- return isHidden;
- }
-
- public boolean isReadOnly() {
- return isReadOnly;
- }
-
- @Override
- public String toString() {
- return prettyName;
- }
-
- public String getKind() {
- return isHidden() ? null : TaskAttribute.KIND_DEFAULT;
- }
-
- public String getType() {
- return type;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
deleted file mode 100644
index bdc2be37e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaAttributeMapper.java
+++ /dev/null
@@ -1,400 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-
-/**
- * @author Rob Elves
- * @author Frank Becker
- */
-public class BugzillaAttributeMapper extends TaskAttributeMapper {
-
- private final String dateFormat_1 = "yyyy-MM-dd HH:mm:ss"; //$NON-NLS-1$
-
- private final String dateFormat_2 = "yyyy-MM-dd HH:mm"; //$NON-NLS-1$
-
- private final String dateFormat_3 = "yyyy-MM-dd"; //$NON-NLS-1$
-
- private final String dateFormat_1_TimeZone = "yyyy-MM-dd HH:mm:ss zzz"; //$NON-NLS-1$
-
- private final String dateFormat_2_TimeZone = "yyyy-MM-dd HH:mm zzz"; //$NON-NLS-1$
-
- private final String dateFormat_3_TimeZone = "yyyy-MM-dd zzz"; //$NON-NLS-1$
-
- public BugzillaAttributeMapper(TaskRepository taskRepository) {
- super(taskRepository);
- }
-
- @Override
- public Date getDateValue(TaskAttribute attribute) {
- if (attribute == null) {
- return null;
- }
- String dateString = attribute.getValue();
- String id = attribute.getId();
- Date parsedDate = getDate(id, dateString);
- if (parsedDate == null) {
- parsedDate = super.getDateValue(attribute);
- }
- return parsedDate;
- }
-
- @Override
- public boolean getBooleanValue(TaskAttribute attribute) {
- if (attribute.getValue().equals("1")) { //$NON-NLS-1$
- return true;
- } else {
- return false;
- }
- }
-
- @Override
- public void setBooleanValue(TaskAttribute attribute, Boolean value) {
- if (value == null) {
- attribute.setValue("0"); //$NON-NLS-1$
- } else if (value) {
- attribute.setValue("1"); //$NON-NLS-1$
- } else {
- attribute.setValue("0"); //$NON-NLS-1$
- }
- }
-
- /**
- * Note: Date formatters constructed within method for thread safety
- */
- protected Date getDate(String attributeId, String dateString) {
- Date parsedDate = null;
-
- /**
- * Bugzilla < 2.22 uses "yyyy-MM-dd HH:mm" but later versions use "yyyy-MM-dd HH:mm:ss" Using lowest common
- * denominator "yyyy-MM-dd HH:mm"
- */
-
- RepositoryConfiguration repositoryConfiguration;
- BugzillaVersion bugzillaVersion = null;
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(getTaskRepository().getUrl());
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
-
- SimpleDateFormat comment_creation_ts_Format;
- SimpleDateFormat attachment_creation_ts_Format;
-
- SimpleDateFormat comment_creation_ts_Format_Timezone;
- SimpleDateFormat attachment_creation_ts_Format_Timezone;
-
- try {
- if (attributeId.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_1_TimeZone).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_2_TimeZone).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- comment_creation_ts_Format_Timezone = new SimpleDateFormat(dateFormat_2_TimeZone);
- } else {
- comment_creation_ts_Format_Timezone = new SimpleDateFormat(dateFormat_1_TimeZone);
- }
- parsedDate = comment_creation_ts_Format_Timezone.parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DATE.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- attachment_creation_ts_Format_Timezone = new SimpleDateFormat(dateFormat_2_TimeZone);
- } else {
- attachment_creation_ts_Format_Timezone = new SimpleDateFormat(dateFormat_1_TimeZone);
- }
- parsedDate = attachment_creation_ts_Format_Timezone.parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DEADLINE.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_3_TimeZone).parse(dateString);
- } else if (attributeId.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- parsedDate = new SimpleDateFormat(dateFormat_1_TimeZone).parse(dateString);
- }
- } catch (ParseException e) {
- try {
- if (attributeId.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_1).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_2).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- comment_creation_ts_Format = new SimpleDateFormat(dateFormat_2);
- } else {
- comment_creation_ts_Format = new SimpleDateFormat(dateFormat_1);
- }
- parsedDate = comment_creation_ts_Format.parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DATE.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- attachment_creation_ts_Format = new SimpleDateFormat(dateFormat_2);
- } else {
- attachment_creation_ts_Format = new SimpleDateFormat(dateFormat_1);
- }
- parsedDate = attachment_creation_ts_Format.parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DEADLINE.getKey())) {
- parsedDate = new SimpleDateFormat(dateFormat_3).parse(dateString);
- } else if (attributeId.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- parsedDate = new SimpleDateFormat(dateFormat_1).parse(dateString);
- }
- } catch (ParseException e1) {
-
- try {
- // Fall back to legacy formats
- String delta_ts_format = dateFormat_1;
- String creation_ts_format = dateFormat_2;
- String deadline_format = dateFormat_3;
- String customAttribute_format = dateFormat_1;
- String comment_creation_ts_format = dateFormat_2;
- String attachment_creation_ts_format = dateFormat_2;
- if (attributeId.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- parsedDate = new SimpleDateFormat(delta_ts_format).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- parsedDate = new SimpleDateFormat(creation_ts_format).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- parsedDate = new SimpleDateFormat(comment_creation_ts_format).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DATE.getKey())) {
- parsedDate = new SimpleDateFormat(attachment_creation_ts_format).parse(dateString);
- } else if (attributeId.equals(BugzillaAttribute.DEADLINE.getKey())) {
- parsedDate = new SimpleDateFormat(deadline_format).parse(dateString);
- } else if (attributeId.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- parsedDate = new SimpleDateFormat(customAttribute_format).parse(dateString);
- }
- } catch (ParseException e2) {
- }
- }
- } catch (NumberFormatException e) {
- }
- return parsedDate;
- }
-
- @Override
- public void setDateValue(TaskAttribute attribute, Date date) {
- if (date != null) {
-
- RepositoryConfiguration repositoryConfiguration;
- BugzillaVersion bugzillaVersion = null;
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(getTaskRepository().getUrl());
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
-
- SimpleDateFormat comment_creation_ts_Format;
- SimpleDateFormat attachment_creation_ts_Format;
-
- String dateString = null;
- String attributeId = attribute.getId();
-
- if (attributeId.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- dateString = new SimpleDateFormat(dateFormat_1).format(date);
- } else if (attributeId.equals(BugzillaAttribute.CREATION_TS.getKey())) {
- dateString = new SimpleDateFormat(dateFormat_2).format(date);
- } else if (attributeId.equals(BugzillaAttribute.BUG_WHEN.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- comment_creation_ts_Format = new SimpleDateFormat(dateFormat_2);
- } else {
- comment_creation_ts_Format = new SimpleDateFormat(dateFormat_1);
- }
- dateString = comment_creation_ts_Format.format(date);
- } else if (attributeId.equals(BugzillaAttribute.DATE.getKey())) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_22) < 0) {
- attachment_creation_ts_Format = new SimpleDateFormat(dateFormat_2);
- } else {
- attachment_creation_ts_Format = new SimpleDateFormat(dateFormat_1);
- }
- dateString = attachment_creation_ts_Format.format(date);
- } else if (attributeId.equals(BugzillaAttribute.DEADLINE.getKey())) {
- dateString = new SimpleDateFormat(dateFormat_3).format(date);
- } else if (attributeId.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- dateString = new SimpleDateFormat(dateFormat_1).format(date);
- }
-
- if (dateString == null) {
- super.setDateValue(attribute, date);
- } else {
- attribute.setValue(dateString);
- }
-
- } else {
- attribute.clearValues();
- }
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public String mapToRepositoryKey(TaskAttribute parent, String key) {
- /*if (key.equals(TaskAttribute.NEW_CC)) {
- return BugzillaReportElement.NEWCC.getKey();
- } else*/if (key.equals(TaskAttribute.COMMENT_DATE)) {
- return BugzillaAttribute.BUG_WHEN.getKey();
- } else if (key.equals(TaskAttribute.COMMENT_AUTHOR)) {
- return BugzillaAttribute.WHO.getKey();
- } else if (key.equals(TaskAttribute.COMMENT_AUTHOR_NAME)) {
- return BugzillaAttribute.WHO_NAME.getKey();
- } else if (key.equals(TaskAttribute.USER_CC)) {
- return BugzillaAttribute.CC.getKey();
- } else if (key.equals(TaskAttribute.COMMENT_TEXT)) {
- return BugzillaAttribute.THETEXT.getKey();
- } else if (key.equals(TaskAttribute.DATE_CREATION)) {
- return BugzillaAttribute.CREATION_TS.getKey();
- } else if (key.equals(TaskAttribute.DESCRIPTION)) {
- return BugzillaAttribute.LONG_DESC.getKey();
- } else if (key.equals(TaskAttribute.ATTACHMENT_ID)) {
- return BugzillaAttribute.ATTACHID.getKey();
- } else if (key.equals(TaskAttribute.ATTACHMENT_DESCRIPTION)) {
- return BugzillaAttribute.DESC.getKey();
- } else if (key.equals(TaskAttribute.ATTACHMENT_CONTENT_TYPE)) {
- return BugzillaAttribute.CTYPE.getKey();
- //return BugzillaReportElement.TYPE.getKey();*/
- } else if (key.equals(TaskAttribute.USER_ASSIGNED)) {
- return BugzillaAttribute.ASSIGNED_TO.getKey();
- } else if (key.equals(TaskAttribute.USER_ASSIGNED_NAME)) {
- return BugzillaAttribute.ASSIGNED_TO_NAME.getKey();
- } else if (key.equals(TaskAttribute.RESOLUTION)) {
- return BugzillaAttribute.RESOLUTION.getKey();
- } else if (key.equals(TaskAttribute.STATUS)) {
- return BugzillaAttribute.BUG_STATUS.getKey();
- } else if (key.equals(TaskAttribute.DATE_MODIFICATION)) {
- return BugzillaAttribute.DELTA_TS.getKey();
- } else if (key.equals(TaskAttribute.USER_REPORTER)) {
- return BugzillaAttribute.REPORTER.getKey();
- } else if (key.equals(TaskAttribute.USER_REPORTER_NAME)) {
- return BugzillaAttribute.REPORTER_NAME.getKey();
- } else if (key.equals(TaskAttribute.SUMMARY)) {
- return BugzillaAttribute.SHORT_DESC.getKey();
- } else if (key.equals(TaskAttribute.PRODUCT)) {
- return BugzillaAttribute.PRODUCT.getKey();
- } else if (key.equals(TaskAttribute.KEYWORDS)) {
- return BugzillaAttribute.KEYWORDS.getKey();
- } else if (key.equals(TaskAttribute.ATTACHMENT_DATE)) {
- return BugzillaAttribute.DATE.getKey();
- } else if (key.equals(TaskAttribute.ATTACHMENT_SIZE)) {
- return BugzillaAttribute.SIZE.getKey();
- } else if (key.equals(TaskAttribute.ADD_SELF_CC)) {
- return BugzillaAttribute.ADDSELFCC.getKey();
- } else if (key.equals(TaskAttribute.PRIORITY)) {
- return BugzillaAttribute.PRIORITY.getKey();
- } else if (key.equals(TaskAttribute.COMMENT_NEW)) {
- return BugzillaAttribute.NEW_COMMENT.getKey();
- } else if (key.equals(TaskAttribute.COMPONENT)) {
- return BugzillaAttribute.COMPONENT.getKey();
- } else if (key.equals(TaskAttribute.TASK_KEY)) {
- return BugzillaAttribute.BUG_ID.getKey();
- } else if (key.equals(TaskAttribute.DATE_DUE)) {
- return BugzillaAttribute.DEADLINE.getKey();
- } else if (key.equals(TaskAttribute.SEVERITY)) {
- return BugzillaAttribute.BUG_SEVERITY.getKey();
- } else if (key.equals(TaskAttribute.VERSION)) {
- return BugzillaAttribute.VERSION.getKey();
- }
- return super.mapToRepositoryKey(parent, key);
- }
-
- @Override
- public TaskAttribute getAssoctiatedAttribute(TaskAttribute taskAttribute) {
- String id = taskAttribute.getMetaData().getValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (id != null) {
- // operation associated input attributes are stored on the root attribute
- if (TaskAttribute.TYPE_OPERATION.equals(taskAttribute.getMetaData().getType())) {
- return taskAttribute.getTaskData().getRoot().getMappedAttribute(id);
- }
- return taskAttribute.getMappedAttribute(id);
- }
- return null;
- }
-
- @Override
- public IRepositoryPerson getRepositoryPerson(TaskAttribute taskAttribute) {
-
- IRepositoryPerson person = super.getRepositoryPerson(taskAttribute);
- if (person.getName() == null) {
- if (taskAttribute.getId().equals(BugzillaAttribute.ASSIGNED_TO.getKey())) {
- TaskAttribute attrAssigned = taskAttribute.getTaskData().getRoot().getAttribute(
- BugzillaAttribute.ASSIGNED_TO_NAME.getKey());
- if (attrAssigned != null) {
- person.setName(attrAssigned.getValue());
- }
- } else if (taskAttribute.getId().equals(BugzillaAttribute.REPORTER.getKey())) {
- TaskAttribute attrReporter = taskAttribute.getTaskData().getRoot().getAttribute(
- BugzillaAttribute.REPORTER_NAME.getKey());
- if (attrReporter != null) {
- person.setName(attrReporter.getValue());
- }
- } else if (taskAttribute.getId().equals(BugzillaAttribute.QA_CONTACT.getKey())) {
- TaskAttribute attrReporter = taskAttribute.getTaskData().getRoot().getAttribute(
- BugzillaAttribute.QA_CONTACT_NAME.getKey());
- if (attrReporter != null) {
- person.setName(attrReporter.getValue());
- }
- }
- }
- return person;
- }
-
- @Override
- public Map<String, String> getOptions(TaskAttribute attribute) {
- RepositoryConfiguration configuration = BugzillaCorePlugin.getRepositoryConfiguration(getTaskRepository().getRepositoryUrl());
- if (configuration != null) {
- TaskAttribute attributeProduct = attribute.getTaskData().getRoot().getMappedAttribute(
- BugzillaAttribute.PRODUCT.getKey());
- if (attributeProduct != null && attributeProduct.getValue().length() > 0) {
- List<String> options = configuration.getAttributeOptions(attributeProduct.getValue(), attribute);
- if (options.size() == 0 && attribute.getId().equals(BugzillaOperation.resolve.getInputId())) {
- options = configuration.getOptionValues(BugzillaAttribute.RESOLUTION, attributeProduct.getValue());
- // DUPLICATE and MOVED have special meanings so do not show as resolution
- // TODO: COPIED FUNCTIONALITY from RepositoryConfiguration.addOperation() refactor.
- options.remove("DUPLICATE"); //$NON-NLS-1$
- options.remove("MOVED"); //$NON-NLS-1$
- }
- Map<String, String> newOptions = new LinkedHashMap<String, String>();
- for (String option : options) {
- newOptions.put(option, option);
- }
- return newOptions;
- }
- }
- return super.getOptions(attribute);
- }
-
- @Override
- public boolean equals(TaskAttribute newAttribute, TaskAttribute oldAttribute) {
- if (oldAttribute.getId().startsWith(TaskAttribute.PREFIX_ATTACHMENT)) {
- TaskAttachmentMapper oldAttachment;
- oldAttachment = TaskAttachmentMapper.createFrom(oldAttribute);
- TaskAttachmentMapper newAttachment;
- newAttachment = TaskAttachmentMapper.createFrom(newAttribute);
- return newAttachment.equals(oldAttachment);
- }
- return super.equals(newAttribute, oldAttribute);
- }
-
- @Override
- public String getLabel(TaskAttribute taskAttribute) {
- if (taskAttribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- return super.getLabel(taskAttribute) + ":"; //$NON-NLS-1$
- } else {
- return super.getLabel(taskAttribute);
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
deleted file mode 100644
index 0365a73c9..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClient.java
+++ /dev/null
@@ -1,2016 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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
- * Frank Becker - fixes for bug 165072
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.net.HttpURLConnection;
-import java.net.MalformedURLException;
-import java.net.Proxy;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.nio.charset.Charset;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-
-import javax.security.auth.login.LoginException;
-import javax.swing.text.html.HTML.Tag;
-
-import org.apache.commons.httpclient.Cookie;
-import org.apache.commons.httpclient.Header;
-import org.apache.commons.httpclient.HostConfiguration;
-import org.apache.commons.httpclient.HttpClient;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpMethodBase;
-import org.apache.commons.httpclient.HttpStatus;
-import org.apache.commons.httpclient.NameValuePair;
-import org.apache.commons.httpclient.RedirectException;
-import org.apache.commons.httpclient.URI;
-import org.apache.commons.httpclient.methods.GetMethod;
-import org.apache.commons.httpclient.methods.HeadMethod;
-import org.apache.commons.httpclient.methods.multipart.FilePart;
-import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
-import org.apache.commons.httpclient.methods.multipart.Part;
-import org.apache.commons.httpclient.methods.multipart.PartBase;
-import org.apache.commons.httpclient.methods.multipart.StringPart;
-import org.apache.commons.httpclient.params.HttpMethodParams;
-import org.eclipse.core.net.proxy.IProxyData;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer;
-import org.eclipse.mylyn.commons.net.HtmlTag;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.commons.net.WebUtil;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token;
-import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser;
-import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.RepositoryResponse;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryResponse.ResponseKind;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentPartSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- * @author Steffen Pingel
- */
-public class BugzillaClient {
-
- private static final String COOKIE_BUGZILLA_LOGIN = "Bugzilla_login"; //$NON-NLS-1$
-
- protected static final String USER_AGENT = "BugzillaConnector"; //$NON-NLS-1$
-
- private static final int MAX_RETRIEVED_PER_QUERY = 50;
-
- private static final String QUERY_DELIMITER = "?"; //$NON-NLS-1$
-
- private static final String KEY_ID = "id"; //$NON-NLS-1$
-
- private static final String VAL_TRUE = "true"; //$NON-NLS-1$
-
- private static final String KEY_CC = "cc"; //$NON-NLS-1$
-
- private static final String POST_BUG_CGI = "/post_bug.cgi"; //$NON-NLS-1$
-
- private static final String PROCESS_BUG_CGI = "/process_bug.cgi"; //$NON-NLS-1$
-
- private static final String PROCESS_ATTACHMENT_CGI = "/attachment.cgi"; //$NON-NLS-1$
-
- public static final int WRAP_LENGTH = 80;
-
- private static final String VAL_PROCESS_BUG = "process_bug"; //$NON-NLS-1$
-
- private static final String KEY_FORM_NAME = "form_name"; //$NON-NLS-1$
-
- private static final String VAL_NONE = "none"; //$NON-NLS-1$
-
- private static final String KEY_KNOB = "knob"; //$NON-NLS-1$
-
- // TODO change to BugzillaReportElement.ADD_COMMENT
- private static final String KEY_COMMENT = "comment"; //$NON-NLS-1$
-
- private static final String KEY_SHORT_DESC = "short_desc"; //$NON-NLS-1$
-
- private static final String VALUE_CONTENTTYPEMETHOD_MANUAL = "manual"; //$NON-NLS-1$
-
- private static final String VALUE_ISPATCH = "1"; //$NON-NLS-1$
-
- private static final String VALUE_ACTION_INSERT = "insert"; //$NON-NLS-1$
-
- private static final String ATTRIBUTE_CONTENTTYPEENTRY = "contenttypeentry"; //$NON-NLS-1$
-
- private static final String ATTRIBUTE_CONTENTTYPEMETHOD = "contenttypemethod"; //$NON-NLS-1$
-
- private static final String ATTRIBUTE_ISPATCH = "ispatch"; //$NON-NLS-1$
-
- private static final String CONTENT_TYPE_APP_RDF_XML = "application/rdf+xml"; //$NON-NLS-1$
-
- private static final String CONTENT_TYPE_APP_XML = "application/xml"; //$NON-NLS-1$
-
- private static final String CONTENT_TYPE_TEXT_XML = "text/xml"; //$NON-NLS-1$
-
- private static final String[] VALID_CONFIG_CONTENT_TYPES = { CONTENT_TYPE_APP_RDF_XML, CONTENT_TYPE_APP_XML,
- CONTENT_TYPE_TEXT_XML };
-
- private static final String ATTR_CHARSET = "charset"; //$NON-NLS-1$
-
- protected Proxy proxy = Proxy.NO_PROXY;
-
- protected URL repositoryUrl;
-
- protected String characterEncoding;
-
- private boolean loggedIn;
-
- private final Map<String, String> configParameters;
-
- private final HttpClient httpClient = new HttpClient(WebUtil.getConnectionManager());
-
- private boolean lastModifiedSupported = true;
-
- private final BugzillaLanguageSettings bugzillaLanguageSettings;
-
- private RepositoryConfiguration repositoryConfiguration;
-
- private HostConfiguration hostConfiguration;
-
- private final AbstractWebLocation location;
-
- public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters,
- BugzillaLanguageSettings languageSettings) throws MalformedURLException {
- this.repositoryUrl = new URL(location.getUrl());
- this.location = location;
- this.characterEncoding = characterEncoding;
- this.configParameters = configParameters;
- this.bugzillaLanguageSettings = languageSettings;
- this.proxy = location.getProxyForHost(location.getUrl(), IProxyData.HTTP_PROXY_TYPE);
- WebUtil.configureHttpClient(httpClient, USER_AGENT);
-
- }
-
- public void validate(IProgressMonitor monitor) throws IOException, CoreException {
- monitor = Policy.monitorFor(monitor);
- GzipGetMethod method = null;
- try {
- logout(monitor);
- method = getConnect(repositoryUrl + "/", monitor); //$NON-NLS-1$
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- protected boolean hasAuthenticationCredentials() {
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- return (credentials != null && credentials.getUserName() != null && credentials.getUserName().length() > 0);
- }
-
- private GzipGetMethod getConnect(String serverURL, IProgressMonitor monitor) throws IOException, CoreException {
-
- return connectInternal(serverURL, false, monitor);
-
- }
-
- /**
- * in order to provide an even better solution for bug 196056 the size of the bugzilla configuration downloaded must
- * be reduced. By using a cached version of the config.cgi this can reduce traffic considerably:
- * http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.phoenix/infra-scripts/bugzilla/?root=Technology_Project
- *
- * @param serverURL
- * @return a GetMethod with possibly gzip encoded response body, so caller MUST check with
- * "gzip".equals(method.getResponseHeader("Content-encoding") or use the utility method
- * getResponseBodyAsUnzippedStream().
- * @throws IOException
- * @throws CoreException
- */
- protected GzipGetMethod getConnectGzip(String serverURL, IProgressMonitor monitor) throws IOException,
- CoreException {
-
- return connectInternal(serverURL, true, monitor);
-
- }
-
- private GzipGetMethod connectInternal(String requestURL, boolean gzip, IProgressMonitor monitor)
- throws IOException, CoreException {
- monitor = Policy.monitorFor(monitor);
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
-
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- authenticate(monitor);
-
- GzipGetMethod getMethod = new GzipGetMethod(WebUtil.getRequestPath(requestURL), gzip);
- if (requestURL.contains(QUERY_DELIMITER)) {
- getMethod.setQueryString(requestURL.substring(requestURL.indexOf(QUERY_DELIMITER)));
- }
-
- getMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
- + getCharacterEncoding());
-
- // Resolves bug#195113
- httpClient.getParams().setParameter("http.protocol.single-cookie-header", true); //$NON-NLS-1$
-
- // WARNING!! Setting browser compatibility breaks Bugzilla
- // authentication
- // getMethod.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
- // getMethod.getParams().setCookiePolicy(CookiePolicy.RFC_2109);
-
- getMethod.setDoAuthentication(true);
-
- int code;
- try {
- code = WebUtil.execute(httpClient, hostConfiguration, getMethod, monitor);
- } catch (IOException e) {
- getMethod.getResponseBodyNoop();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), e));
- }
-
- if (code == HttpURLConnection.HTTP_OK) {
- return getMethod;
- } else if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- getMethod.getResponseBodyNoop();
- // login or reauthenticate due to an expired session
- getMethod.releaseConnection();
- loggedIn = false;
- authenticate(monitor);
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- loggedIn = false;
- getMethod.getResponseBodyNoop();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required")); //$NON-NLS-1$
- } else {
- getMethod.getResponseBodyNoop();
- getMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
- }
- }
-
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString() //$NON-NLS-1$
- + " failed. Please verify connection and authentication information.")); //$NON-NLS-1$
- }
-
- public void logout(IProgressMonitor monitor) throws IOException, CoreException {
- monitor = Policy.monitorFor(monitor);
- String loginUrl = repositoryUrl + "/relogin.cgi"; //$NON-NLS-1$
- GzipGetMethod method = null;
- try {
- method = getConnect(loginUrl, monitor);
- loggedIn = false;
- httpClient.getState().clearCookies();
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- protected InputStream getResponseStream(HttpMethodBase method, IProgressMonitor monitor) throws IOException {
- InputStream in = WebUtil.getResponseBodyAsStream(method, monitor);
- if (isZippedReply(method)) {
- in = new java.util.zip.GZIPInputStream(in);
- }
- return in;
- }
-
- private boolean isZippedReply(HttpMethodBase method) {
- // content-encoding:gzip can be set by a dedicated perl script or mod_gzip
- boolean zipped = (null != method.getResponseHeader("Content-encoding") && method.getResponseHeader( //$NON-NLS-1$
- "Content-encoding").getValue().equals(IBugzillaConstants.CONTENT_ENCODING_GZIP)) //$NON-NLS-1$
- ||
- // content-type: application/x-gzip can be set by any apache after 302 redirect, based on .gz suffix
- (null != method.getResponseHeader("Content-Type") && method.getResponseHeader("Content-Type") //$NON-NLS-1$ //$NON-NLS-2$
- .getValue()
- .equals("application/x-gzip")); //$NON-NLS-1$
- return zipped;
- }
-
- public void authenticate(IProgressMonitor monitor) throws CoreException {
- if (loggedIn || !hasAuthenticationCredentials()) {
- return;
-// throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
-// RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
-// "Authentication credentials missing.")); //$NON-NLS-1$
- }
-
- monitor = Policy.monitorFor(monitor);
-
- GzipPostMethod postMethod = null;
-
- try {
-
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
-
- NameValuePair[] formData = new NameValuePair[2];
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- if (credentials == null) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Authentication credentials from location missing.")); //$NON-NLS-1$
- }
- formData[0] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, credentials.getUserName());
- formData[1] = new NameValuePair(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, credentials.getPassword());
-
- postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString()
- + IBugzillaConstants.URL_POST_LOGIN), true);
-
- postMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
- + getCharacterEncoding());
-
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
- postMethod.setFollowRedirects(false);
- httpClient.getState().clearCookies();
-
- AuthenticationCredentials httpAuthCredentials = location.getCredentials(AuthenticationType.HTTP);
-
- if (httpAuthCredentials != null && httpAuthCredentials.getUserName() != null
- && httpAuthCredentials.getUserName().length() > 0) {
- httpClient.getParams().setAuthenticationPreemptive(true);
- }
-
- int code = WebUtil.execute(httpClient, hostConfiguration, postMethod, monitor);
- if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- loggedIn = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "HTTP authentication failed.")); //$NON-NLS-1$
-
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- loggedIn = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required")); //$NON-NLS-1$
-
- } else if (code != HttpURLConnection.HTTP_OK) {
- loggedIn = false;
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
- }
-
- if (hasAuthenticationCredentials()) {
- for (Cookie cookie : httpClient.getState().getCookies()) {
- if (cookie.getName().equals(COOKIE_BUGZILLA_LOGIN)) {
- loggedIn = true;
- break;
- }
- }
-
- if (!loggedIn) {
- InputStream input = getResponseStream(postMethod, monitor);
- try {
- parseHtmlError(input);
- } finally {
- input.close();
- }
- }
- } else {
- // anonymous login
- loggedIn = true;
- }
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), e));
- } finally {
- if (postMethod != null) {
- postMethod.releaseConnection();
- }
- httpClient.getParams().setAuthenticationPreemptive(false);
- }
- }
-
- public boolean getSearchHits(IRepositoryQuery query, TaskDataCollector collector, TaskAttributeMapper mapper,
- IProgressMonitor monitor) throws IOException, CoreException {
- HttpMethodBase postMethod = null;
-
- try {
- authenticate(new SubProgressMonitor(monitor, 1));
- String queryUrl = query.getUrl();
- int start = queryUrl.indexOf('?');
-
- List<NameValuePair> pairs = new ArrayList<NameValuePair>();
- if (start != -1) {
- queryUrl = queryUrl.substring(start + 1);
- String[] result = queryUrl.split("&"); //$NON-NLS-1$
- if (result.length > 0) {
- for (String string : result) {
- String[] nameValue = string.split("="); //$NON-NLS-1$
- if (nameValue.length == 1) {
- pairs.add(new NameValuePair(nameValue[0].trim(), "")); //$NON-NLS-1$
- } else if (nameValue.length == 2 && nameValue[0] != null && nameValue[1] != null) {
-
- //Hack around bugzilla's change of attribute name for comment search field bug#289155
- if (nameValue[0].startsWith("long_desc")) {
- pairs.add(new NameValuePair(nameValue[0].replace("long_desc", "longdesc"),
- URLDecoder.decode(nameValue[1].trim(), getCharacterEncoding())));
- }
-
- pairs.add(new NameValuePair(nameValue[0].trim(), URLDecoder.decode(nameValue[1].trim(),
- getCharacterEncoding())));
- }
- }
- }
- }
-
- NameValuePair ctypePair = new NameValuePair("ctype", "rdf"); //$NON-NLS-1$ //$NON-NLS-2$
- // Test that we don't specify content type twice.
- if (!pairs.contains(ctypePair)) {
- pairs.add(ctypePair);
- }
-
- try {
- postMethod = postFormData(IBugzillaConstants.URL_BUGLIST,
- pairs.toArray(new NameValuePair[pairs.size()]), monitor);
- } catch (RedirectException r) {
- // Handle one redirect (Bugzilla 3.4 provides a redirect upon query submission via post)
- postMethod = getConnectGzip(r.getMessage(), monitor);
- }
-
- if (postMethod != null && postMethod.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
- Header responseTypeHeader = postMethod.getResponseHeader("Content-Type"); //$NON-NLS-1$
- for (String type : VALID_CONFIG_CONTENT_TYPES) {
- if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
- InputStream stream = getResponseStream(postMethod, monitor);
- try {
- RepositoryQueryResultsFactory queryFactory = getQueryResultsFactory(stream);
- int count = queryFactory.performQuery(repositoryUrl.toString(), collector, mapper,
- TaskDataCollector.MAX_HITS);
- return count > 0;
- } finally {
- stream.close();
- }
- }
- }
- }
-
- parseHtmlError(getResponseStream(postMethod, monitor));
- } finally {
- if (postMethod != null) {
- postMethod.releaseConnection();
- }
- }
- return false;
- }
-
- protected RepositoryQueryResultsFactory getQueryResultsFactory(InputStream stream) {
- return new RepositoryQueryResultsFactory(stream, getCharacterEncoding());
- }
-
- public static void setupExistingBugAttributes(String serverUrl, TaskData existingReport) {
- // ordered list of elements as they appear in UI
- // and additional elements that may not appear in the incoming xml
- // stream but need to be present for bug submission / not always dirty
- // state handling
- BugzillaAttribute[] reportElements = { BugzillaAttribute.SHORT_DESC, BugzillaAttribute.BUG_STATUS,
- BugzillaAttribute.RESOLUTION, BugzillaAttribute.BUG_ID, BugzillaAttribute.REP_PLATFORM,
- BugzillaAttribute.PRODUCT, BugzillaAttribute.OP_SYS, BugzillaAttribute.COMPONENT,
- BugzillaAttribute.VERSION, BugzillaAttribute.PRIORITY, BugzillaAttribute.BUG_SEVERITY,
- BugzillaAttribute.ASSIGNED_TO, BugzillaAttribute.TARGET_MILESTONE, BugzillaAttribute.REPORTER,
- BugzillaAttribute.DEPENDSON, BugzillaAttribute.BLOCKED, BugzillaAttribute.BUG_FILE_LOC,
- BugzillaAttribute.NEWCC, BugzillaAttribute.KEYWORDS, BugzillaAttribute.CC,
- BugzillaAttribute.NEW_COMMENT, BugzillaAttribute.QA_CONTACT, BugzillaAttribute.STATUS_WHITEBOARD
- };
-
- for (BugzillaAttribute element : reportElements) {
- BugzillaTaskDataHandler.createAttribute(existingReport, element);
- }
- }
-
- public static String getBugUrlWithoutLogin(String repositoryUrl, String id) {
- String url = repositoryUrl + IBugzillaConstants.URL_GET_SHOW_BUG + id;
- return url;
- }
-
- public static String getCharsetFromString(String string) {
- int charsetStartIndex = string.indexOf(ATTR_CHARSET);
- if (charsetStartIndex != -1) {
- int charsetEndIndex = string.indexOf("\"", charsetStartIndex); // TODO: //$NON-NLS-1$
- // could
- // be
- // space
- // after?
- if (charsetEndIndex == -1) {
- charsetEndIndex = string.length();
- }
- String charsetString = string.substring(charsetStartIndex + 8, charsetEndIndex);
- if (Charset.availableCharsets().containsKey(charsetString)) {
- return charsetString;
- }
- }
- return null;
- }
-
- public RepositoryConfiguration getRepositoryConfiguration(IProgressMonitor monitor) throws IOException,
- CoreException {
- GzipGetMethod method = null;
- int attempt = 0;
- while (attempt < 2) {
- try {
- method = getConnectGzip(repositoryUrl + IBugzillaConstants.URL_GET_CONFIG_RDF, monitor);
- // provide a solution for bug 196056 by allowing a (cached) gzipped configuration to be sent
- // modified to also accept "application/x-gzip" as results from a 302 redirect to a previously gzipped file.
- if (method == null) {
- throw new IOException("Could not retrieve configuratoin. HttpClient return null method."); //$NON-NLS-1$
- }
-
- InputStream stream = getResponseStream(method, monitor);
- try {
- if (method.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
- Header responseTypeHeader = method.getResponseHeader("Content-Type"); //$NON-NLS-1$
- for (String type : VALID_CONFIG_CONTENT_TYPES) {
- if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
- RepositoryConfigurationFactory configFactory = new RepositoryConfigurationFactory(
- stream, getCharacterEncoding());
-
- repositoryConfiguration = configFactory.getConfiguration();
-
- if (repositoryConfiguration != null) {
- if (!repositoryConfiguration.getProducts().isEmpty()) {
- repositoryConfiguration.setRepositoryUrl(repositoryUrl.toString());
- return repositoryConfiguration;
- } else {
- if (attempt == 0) {
- // empty configuration, retry authenticate
- loggedIn = false;
- break;
- } else {
- throw new CoreException(
- new Status(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve repository configuration. Ensure credentials are valid.")); //$NON-NLS-1$
- }
- }
- }
- }
- }
-
- }
- if (loggedIn) {
- parseHtmlError(stream);
- return null;
- }
- } finally {
- stream.close();
- }
- } finally {
- attempt++;
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
- return null;
- }
-
- public void getAttachmentData(String attachmentId, OutputStream out, IProgressMonitor monitor) throws IOException,
- CoreException {
- String url = repositoryUrl + IBugzillaConstants.URL_GET_ATTACHMENT_DOWNLOAD + attachmentId;
- GetMethod method = connectInternal(url, false, monitor);//getConnectGzip(url, monitor);
- try {
- int status = WebUtil.execute(httpClient, hostConfiguration, method, monitor);
- if (status == HttpStatus.SC_OK) {
- out.write(method.getResponseBody());
- } else {
- parseHtmlError(method.getResponseBodyAsStream());
- }
- } catch (IOException e) {
- throw e;
- } finally {
- method.releaseConnection();
- }
- }
-
- private String getCharacterEncoding() {
- if (repositoryConfiguration != null && repositoryConfiguration.getEncoding() != null
- && repositoryConfiguration.getEncoding().length() > 0) {
- // Special case for eclipse.org. See bug#280361 and bug#275102
- return repositoryConfiguration.getEncoding();
- } else {
- return characterEncoding;
- }
- }
-
- public void postAttachment(String bugReportID, String comment, AbstractTaskAttachmentSource source,
- TaskAttribute attachmentAttribute, IProgressMonitor monitor) throws HttpException, IOException,
- CoreException {
- monitor = Policy.monitorFor(monitor);
- String description = source.getDescription();
- String contentType = source.getContentType();
- String filename = source.getName();
- boolean isPatch = false;
-
- if (attachmentAttribute != null) {
- TaskAttachmentMapper mapper = TaskAttachmentMapper.createFrom(attachmentAttribute);
-
- if (mapper.getDescription() != null) {
- description = mapper.getDescription();
- }
-
- if (mapper.getContentType() != null) {
- contentType = mapper.getContentType();
- }
-
- if (mapper.getFileName() != null) {
- filename = mapper.getFileName();
- }
-
- if (mapper.isPatch() != null) {
- isPatch = mapper.isPatch();
- }
- }
- Assert.isNotNull(bugReportID);
- Assert.isNotNull(source);
- Assert.isNotNull(contentType);
- if (description == null) {
- throw new CoreException(new Status(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- Messages.BugzillaClient_description_required_when_submitting_attachments));
- }
-
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- authenticate(monitor);
- GzipPostMethod postMethod = null;
-
- try {
- postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl
- + IBugzillaConstants.URL_POST_ATTACHMENT_UPLOAD), true);
- // This option causes the client to first
- // check
- // with the server to see if it will in fact receive the post before
- // actually sending the contents.
- postMethod.getParams().setBooleanParameter(HttpMethodParams.USE_EXPECT_CONTINUE, true);
- List<PartBase> parts = new ArrayList<PartBase>();
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_ACTION, VALUE_ACTION_INSERT, getCharacterEncoding()));
- AuthenticationCredentials credentials = location.getCredentials(AuthenticationType.REPOSITORY);
- String username;
- String password;
- if (credentials != null) {
- username = credentials.getUserName();
- password = credentials.getPassword();
- } else {
- username = null;
- password = null;
-
- }
- if (username != null && password != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_LOGIN, username, getCharacterEncoding()));
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGZILLA_PASSWORD, password,
- getCharacterEncoding()));
- }
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_BUGID, bugReportID, getCharacterEncoding()));
- if (description != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_DESCRIPTION, description, getCharacterEncoding()));
- }
- if (comment != null) {
- parts.add(new StringPart(IBugzillaConstants.POST_INPUT_COMMENT, comment, getCharacterEncoding()));
- }
- parts.add(new FilePart(IBugzillaConstants.POST_INPUT_DATA, new TaskAttachmentPartSource(source, filename)));
-
- if (isPatch) {
- parts.add(new StringPart(ATTRIBUTE_ISPATCH, VALUE_ISPATCH));
- } else {
- parts.add(new StringPart(ATTRIBUTE_CONTENTTYPEMETHOD, VALUE_CONTENTTYPEMETHOD_MANUAL));
- parts.add(new StringPart(ATTRIBUTE_CONTENTTYPEENTRY, contentType));
- }
- if (attachmentAttribute != null) {
- Collection<TaskAttribute> attributes = attachmentAttribute.getAttributes().values();
- Iterator<TaskAttribute> itr = attributes.iterator();
- while (itr.hasNext()) {
- TaskAttribute a = itr.next();
- if (a.getId().startsWith("task.common.kind.flag_type") && repositoryConfiguration != null) { //$NON-NLS-1$
- List<BugzillaFlag> flags = repositoryConfiguration.getFlags();
- TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
- a = a.getAttribute("state"); //$NON-NLS-1$
- String value = a.getValue();
- String id = ""; //$NON-NLS-1$
- if (value.equals(" ")) { //$NON-NLS-1$
- continue;
- }
- String flagname = a.getMetaData().getLabel();
- BugzillaFlag theFlag = null;
- for (BugzillaFlag bugzillaFlag : flags) {
- if (flagname.equals(bugzillaFlag.getName())) {
- theFlag = bugzillaFlag;
- break;
- }
- }
- if (theFlag != null) {
- int flagTypeNumber = theFlag.getFlagId();
- id = "flag_type-" + flagTypeNumber; //$NON-NLS-1$
- value = a.getValue();
- if (value.equals("?") && requestee != null) { //$NON-NLS-1$
- parts.add(new StringPart("requestee_type-" + flagTypeNumber, //$NON-NLS-1$
- requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
- }
- }
- parts.add(new StringPart(id, value != null ? value : "")); //$NON-NLS-1$
- } else if (a.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- TaskAttribute flagnumber = a.getAttribute("number"); //$NON-NLS-1$
- TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
- a = a.getAttribute("state"); //$NON-NLS-1$
- String id = "flag-" + flagnumber.getValue(); //$NON-NLS-1$
- String value = a.getValue();
- if (value.equals(" ")) { //$NON-NLS-1$
- value = "X"; //$NON-NLS-1$
- }
- if (value.equals("?") && requestee != null) { //$NON-NLS-1$
- parts.add(new StringPart("requestee-" + flagnumber.getValue(), //$NON-NLS-1$
- requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
- }
- parts.add(new StringPart(id, value != null ? value : "")); //$NON-NLS-1$
- }
- }
- }
- postMethod.setRequestEntity(new MultipartRequestEntity(parts.toArray(new Part[1]), postMethod.getParams()));
- postMethod.setDoAuthentication(true);
- int status = WebUtil.execute(httpClient, hostConfiguration, postMethod, monitor);
- if (status == HttpStatus.SC_OK) {
- InputStream input = getResponseStream(postMethod, monitor);
- try {
- parseHtmlError(input);
- } finally {
- input.close();
- }
-
- } else {
- postMethod.getResponseBodyNoop();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, repositoryUrl.toString(), "Http error: " //$NON-NLS-1$
- + HttpStatus.getStatusText(status)));
- // throw new IOException("Communication error occurred during
- // upload. \n\n"
- // + HttpStatus.getStatusText(status));
- }
- } finally {
- if (postMethod != null) {
- postMethod.releaseConnection();
- }
- }
- }
-
- /**
- * calling method must release the connection on the returned PostMethod once finished.
- *
- * @throws CoreException
- */
- private GzipPostMethod postFormData(String formUrl, NameValuePair[] formData, IProgressMonitor monitor)
- throws IOException, CoreException {
-
- GzipPostMethod postMethod = null;
- monitor = Policy.monitorFor(monitor);
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- authenticate(monitor);
-
- postMethod = new GzipPostMethod(WebUtil.getRequestPath(repositoryUrl.toString() + formUrl), true);
- postMethod.setRequestHeader(
- "Content-Type", "application/x-www-form-urlencoded; charset=" + getCharacterEncoding()); //$NON-NLS-1$ //$NON-NLS-2$
-
- httpClient.getHttpConnectionManager().getParams().setSoTimeout(WebUtil.getConnectionTimeout());
-
- postMethod.setRequestBody(formData);
- postMethod.setDoAuthentication(true);
-
- int status = WebUtil.execute(httpClient, hostConfiguration, postMethod, monitor);
- if (status == HttpStatus.SC_OK) {
- return postMethod;
- } else if (status == HttpStatus.SC_MOVED_TEMPORARILY) {
- String redirectLocation;
- Header locationHeader = postMethod.getResponseHeader("location"); //$NON-NLS-1$
- if (locationHeader != null) {
- redirectLocation = locationHeader.getValue();
- throw new RedirectException(redirectLocation);
- }
-
- }
-
- postMethod.getResponseBodyNoop();
- postMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), new IOException(
- "Communication error occurred during upload. \n\n" + HttpStatus.getStatusText(status)))); //$NON-NLS-1$
-
- }
-
- public void postUpdateAttachment(TaskAttribute taskAttribute, String action, IProgressMonitor monitor)
- throws IOException, CoreException {
- List<NameValuePair> formData = new ArrayList<NameValuePair>(5);
- boolean existingBugPosted = false;
-
- formData.add(new NameValuePair("action", action)); //$NON-NLS-1$
- formData.add(new NameValuePair("contenttypemethod", "manual")); //$NON-NLS-1$ //$NON-NLS-2$
-
- formData.add(new NameValuePair("id", taskAttribute.getValue())); //$NON-NLS-1$
- Collection<TaskAttribute> attributes = taskAttribute.getAttributes().values();
- Iterator<TaskAttribute> itr = attributes.iterator();
- while (itr.hasNext()) {
- TaskAttribute a = itr.next();
- String id = a.getId();
- String value = a.getValue();
- if (id.equals(TaskAttribute.ATTACHMENT_AUTHOR) || id.equals("date") || id.equals("size") //$NON-NLS-1$ //$NON-NLS-2$
- || id.equals(TaskAttribute.ATTACHMENT_URL)) {
- continue;
- }
-
- if (id.equals("desc")) { //$NON-NLS-1$
- id = "description"; //$NON-NLS-1$
- }
- if (id.equals("ctype")) { //$NON-NLS-1$
- id = "contenttypeentry"; //$NON-NLS-1$
- }
-
- if (id.equals(TaskAttribute.ATTACHMENT_IS_DEPRECATED)) {
- id = "isobsolete"; //$NON-NLS-1$
- }
- if (id.equals(TaskAttribute.ATTACHMENT_IS_PATCH)) {
- id = "ispatch"; //$NON-NLS-1$
- }
- formData.add(new NameValuePair(id, value));
- }
- GzipPostMethod method = null;
- InputStream input = null;
- try {
- method = postFormData(PROCESS_ATTACHMENT_CGI, formData.toArray(new NameValuePair[formData.size()]), monitor);
-
- if (method == null) {
- throw new IOException(Messages.BugzillaClient_could_not_post_form_null_returned);
- }
-
- input = getResponseStream(method, monitor);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(input, method.getRequestCharSet()));
- if (in.markSupported()) {
- in.mark(1028);
- }
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
-
- boolean isTitle = false;
- String title = ""; //$NON-NLS-1$
-
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
-
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.TITLE
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isTitle = true;
- continue;
- }
-
- if (isTitle) {
- // get all of the data in the title tag
- if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
- continue;
- } else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
-
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_CHANGES_SUBMITTED).iterator(); iterator.hasNext()
- && !existingBugPosted;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- existingBugPosted = existingBugPosted || title.indexOf(value) != -1;
- }
- break;
- }
- }
- }
-
- if (existingBugPosted != true) {
- try {
- if (in.markSupported()) {
- in.reset();
- }
- } catch (IOException e) {
- // ignore
- }
- parseHtmlError(in);
- }
-
- } catch (ParseException e) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$ //$NON-NLS-2$
- } finally {
- if (input != null) {
- input.close();
- }
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
-
- public RepositoryResponse postTaskData(TaskData taskData, IProgressMonitor monitor) throws IOException,
- CoreException {
- NameValuePair[] formData = null;
- monitor = Policy.monitorFor(monitor);
- BugzillaRepositoryResponse response;
- authenticate(new SubProgressMonitor(monitor, 1));
-
- if (repositoryConfiguration == null) {
- getRepositoryConfiguration(new SubProgressMonitor(monitor, 1));
- BugzillaCorePlugin.addRepositoryConfiguration(repositoryConfiguration);
- }
-
- if (taskData == null) {
- return null;
- } else if (taskData.isNew()) {
- formData = getPairsForNew(taskData);
- } else {
- formData = getPairsForExisting(taskData, new SubProgressMonitor(monitor, 1));
- }
-
- String result = null;
- GzipPostMethod method = null;
- InputStream input = null;
- try {
- if (taskData.isNew()) {
- method = postFormData(POST_BUG_CGI, formData, monitor);
- } else {
- method = postFormData(PROCESS_BUG_CGI, formData, monitor);
- }
-
- if (method == null) {
- throw new IOException("Could not post form, client returned null method."); //$NON-NLS-1$
- }
-
- input = getResponseStream(method, monitor);
-
- BufferedReader in = new BufferedReader(new InputStreamReader(input, method.getRequestCharSet()));
- if (in.markSupported()) {
- in.mark(1028);
- }
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
-
- boolean existingBugPosted = false;
- boolean isTitle = false;
- String title = ""; //$NON-NLS-1$
-
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.TITLE
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isTitle = true;
- continue;
- }
-
- if (isTitle) {
- // get all of the data in the title tag
- if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
- continue;
- } else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
-
- boolean found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_PROCESSED).iterator(); iterator.hasNext() && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (!taskData.isNew() && found) {
- existingBugPosted = true;
- } else if (taskData.isNew()) {
-
- int startIndex = -1;
-
- if (result == null) {
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_SUBMITTED).iterator(); iterator.hasNext();) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- int stopIndex = title.indexOf(value);
- if (stopIndex > -1) {
- for (iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_BUG).iterator(); iterator.hasNext();) {
- value = iterator.next().toLowerCase(Locale.ENGLISH);
- startIndex = title.indexOf(value);
- if (startIndex > -1) {
- startIndex = startIndex + value.length();
- result = (title.substring(startIndex, stopIndex)).trim();
- break;
- }
- }
- break;
- }
- }
- }
- }
- break;
- }
- }
- }
- if (taskData.isNew()) {
- response = new BugzillaRepositoryResponse(ResponseKind.TASK_CREATED, result);
- } else {
- response = new BugzillaRepositoryResponse(ResponseKind.TASK_UPDATED, taskData.getTaskId());
- }
- if ((!taskData.isNew() && existingBugPosted != true) || (taskData.isNew() && result == null)) {
- try {
- if (in.markSupported()) {
- in.reset();
- }
- parseHtmlError(in);
- } catch (IOException e) {
- // ignore
- }
- } else {
- try {
- if (in.markSupported()) {
- in.reset();
- }
- parseResultOK(in, response);
- } catch (IOException e) {
- // ignore
- }
- }
- return response;
- } catch (ParseException e) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$//$NON-NLS-2$
- } finally {
- if (input != null) {
- input.close();
- }
- if (method != null) {
- method.releaseConnection();
- }
- }
-
- }
-
- private NameValuePair[] getPairsForNew(TaskData taskData) {
- Map<String, NameValuePair> fields = new HashMap<String, NameValuePair>();
-
- // go through all of the attributes and add them to
- // the bug post
- Collection<TaskAttribute> attributes = new ArrayList<TaskAttribute>(taskData.getRoot().getAttributes().values());
- Iterator<TaskAttribute> itr = attributes.iterator();
- while (itr.hasNext()) {
- TaskAttribute a = itr.next();
- if (a != null && a.getId() != null && a.getId().compareTo("") != 0) { //$NON-NLS-1$
- String value = null;
- value = a.getValue();
- if (value == null) {
- continue;
- }
- String id = a.getId();
- if (id.equals(BugzillaAttribute.NEWCC.getKey())) {
- TaskAttribute b = taskData.getRoot().createAttribute(BugzillaAttribute.CC.getKey());
- b.getMetaData().defaults().setReadOnly(BugzillaAttribute.CC.isReadOnly()).setKind(
- BugzillaAttribute.CC.getKind()).setLabel(BugzillaAttribute.CC.toString()).setType(
- BugzillaAttribute.CC.getType());
- for (String val : a.getValues()) {
- if (val != null) {
- b.addValue(val);
- }
- }
- a = b;
- cleanIfShortLogin(a);
- } else {
- cleanQAContact(a);
- }
- if (a.getMetaData().getType() != null
- && a.getMetaData().getType().equals(TaskAttribute.TYPE_MULTI_SELECT)) {
- List<String> values = a.getValues();
- int i = 0;
- for (String string : values) {
- fields.put(id + i++, new NameValuePair(id, string != null ? string : "")); //$NON-NLS-1$
- }
- } else if (id != null && id.compareTo("") != 0) { //$NON-NLS-1$
- fields.put(id, new NameValuePair(id, value != null ? value : "")); //$NON-NLS-1$
- }
- }
- }
-
- TaskAttribute descAttribute = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (descAttribute != null && !descAttribute.getValue().equals("")) { //$NON-NLS-1$
- BugzillaVersion bugzillaVersion = null;
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
-
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_18) == 0) {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, formatTextToLineWrap(descAttribute.getValue(),
- true)));
- } else {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, descAttribute.getValue()));
- }
- }
-
- return fields.values().toArray(new NameValuePair[fields.size()]);
-
- }
-
- private void cleanQAContact(TaskAttribute a) {
- if (a.getId().equals(BugzillaAttribute.QA_CONTACT.getKey())) {
- cleanIfShortLogin(a);
- }
- }
-
- private void cleanIfShortLogin(TaskAttribute a) {
- if ("true".equals(configParameters.get(IBugzillaConstants.REPOSITORY_SETTING_SHORT_LOGIN))) { //$NON-NLS-1$
- if (a.getValue() != null && a.getValue().length() > 0) {
- int atIndex = a.getValue().indexOf("@"); //$NON-NLS-1$
- if (atIndex != -1) {
- String newValue = a.getValue().substring(0, atIndex);
- a.setValue(newValue);
- }
- }
- }
- }
-
- private NameValuePair[] getPairsForExisting(TaskData model, IProgressMonitor monitor) throws CoreException {
- boolean groupSecurityEnabled = false;
- Map<String, NameValuePair> fields = new HashMap<String, NameValuePair>();
- fields.put(KEY_FORM_NAME, new NameValuePair(KEY_FORM_NAME, VAL_PROCESS_BUG));
- // go through all of the attributes and add them to the bug post
- Collection<TaskAttribute> attributes = model.getRoot().getAttributes().values();
- Iterator<TaskAttribute> itr = attributes.iterator();
- boolean tokenFound = false;
- boolean tokenRequired = false;
- while (itr.hasNext()) {
- TaskAttribute a = itr.next();
-
- if (a == null) {
- continue;
- } else {
- String id = a.getId();
- if (id.equalsIgnoreCase(BugzillaAttribute.TOKEN.getKey())) {
- tokenFound = true;
- } else if (id.equals(BugzillaAttribute.QA_CONTACT.getKey())
- || id.equals(BugzillaAttribute.ASSIGNED_TO.getKey())) {
- cleanIfShortLogin(a);
- } else if (id.equals(BugzillaAttribute.REPORTER.getKey()) || id.equals(BugzillaAttribute.CC.getKey())
- || id.equals(BugzillaAttribute.REMOVECC.getKey())
- || id.equals(BugzillaAttribute.CREATION_TS.getKey())
- || id.equals(BugzillaAttribute.BUG_STATUS.getKey())
- || id.equals(BugzillaAttribute.VOTES.getKey())) {
- continue;
- } else if (id.equals(BugzillaAttribute.NEW_COMMENT.getKey())) {
- BugzillaVersion bugzillaVersion = null;
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_2_18) == 0) {
- a.setValue(formatTextToLineWrap(a.getValue(), true));
- }
- } else if (id.equals(BugzillaAttribute.GROUP.getKey()) && a.getValue().length() > 0) {
- groupSecurityEnabled = true;
- }
-
- if (a.getMetaData().getType() != null
- && a.getMetaData().getType().equals(TaskAttribute.TYPE_MULTI_SELECT)) {
- List<String> values = a.getValues();
- int i = 0;
- for (String string : values) {
- fields.put(id + i++, new NameValuePair(id, string != null ? string : "")); //$NON-NLS-1$
- }
- } else if (id != null && id.compareTo("") != 0) { //$NON-NLS-1$
- String value = a.getValue();
- if (id.equals(BugzillaAttribute.DELTA_TS.getKey())) {
- value = stripTimeZone(value);
- }
- if (id.startsWith("task.common.kind.flag_type") && repositoryConfiguration != null) { //$NON-NLS-1$
- List<BugzillaFlag> flags = repositoryConfiguration.getFlags();
- TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
- a = a.getAttribute("state"); //$NON-NLS-1$
- value = a.getValue();
- if (value.equals(" ")) { //$NON-NLS-1$
- continue;
- }
- String flagname = a.getMetaData().getLabel();
- BugzillaFlag theFlag = null;
- for (BugzillaFlag bugzillaFlag : flags) {
- if (flagname.equals(bugzillaFlag.getName())) {
- theFlag = bugzillaFlag;
- break;
- }
- }
- if (theFlag != null) {
- int flagTypeNumber = theFlag.getFlagId();
- id = "flag_type-" + flagTypeNumber; //$NON-NLS-1$
- value = a.getValue();
- if (value.equals("?") && requestee != null) { //$NON-NLS-1$
- fields.put("requestee_type-" + flagTypeNumber, new NameValuePair("requestee_type-" //$NON-NLS-1$ //$NON-NLS-2$
- + flagTypeNumber, requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
- }
- }
- } else if (id.startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- TaskAttribute flagnumber = a.getAttribute("number"); //$NON-NLS-1$
- TaskAttribute requestee = a.getAttribute("requestee"); //$NON-NLS-1$
- a = a.getAttribute("state"); //$NON-NLS-1$
- id = "flag-" + flagnumber.getValue(); //$NON-NLS-1$
- value = a.getValue();
- if (value.equals(" ")) { //$NON-NLS-1$
- value = "X"; //$NON-NLS-1$
- }
- if (value.equals("?") && requestee != null) { //$NON-NLS-1$
- fields.put("requestee-" + flagnumber.getValue(), new NameValuePair("requestee-" //$NON-NLS-1$//$NON-NLS-2$
- + flagnumber.getValue(), requestee.getValue() != null ? requestee.getValue() : "")); //$NON-NLS-1$
- }
- } else if (id.startsWith("task.common.")) { //$NON-NLS-1$
- // Don't post any remaining non-bugzilla specific attributes
- continue;
- }
- fields.put(id, new NameValuePair(id, value != null ? value : "")); //$NON-NLS-1$
- }
- }
- }
-
- // when posting the bug id is encoded in a hidden field named 'id'
- TaskAttribute attributeBugId = model.getRoot().getAttribute(BugzillaAttribute.BUG_ID.getKey());
- if (attributeBugId != null) {
- fields.put(KEY_ID, new NameValuePair(KEY_ID, attributeBugId.getValue()));
- }
-
- // add the operation to the bug post
- BugzillaVersion bugzillaVersion = null;
- if (repositoryConfiguration != null) {
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } else {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
- if (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_2) < 0) {
-
- TaskAttribute attributeOperation = model.getRoot().getMappedAttribute(TaskAttribute.OPERATION);
- if (attributeOperation == null) {
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, VAL_NONE));
- } else {
- TaskAttribute originalOperation = model.getRoot().getAttribute(
- TaskAttribute.PREFIX_OPERATION + attributeOperation.getValue());
- if (originalOperation == null) {
- // Work around for bug#241012
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, VAL_NONE));
- } else {
- String inputAttributeId = originalOperation.getMetaData().getValue(
- TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (inputAttributeId == null || inputAttributeId.equals("")) { //$NON-NLS-1$
- String sel = attributeOperation.getValue();
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, sel));
- } else {
- fields.put(KEY_KNOB, new NameValuePair(KEY_KNOB, attributeOperation.getValue()));
- TaskAttribute inputAttribute = attributeOperation.getTaskData().getRoot().getAttribute(
- inputAttributeId);
- if (inputAttribute != null) {
- if (inputAttribute.getOptions().size() > 0) {
- String sel = inputAttribute.getValue();
- String knob = inputAttribute.getId();
- if (knob.equals(BugzillaOperation.resolve.getInputId())) {
- knob = BugzillaAttribute.RESOLUTION.getKey();
- }
- fields.put(knob, new NameValuePair(knob, inputAttribute.getOption(sel)));
- } else {
- String sel = inputAttribute.getValue();
- String knob = attributeOperation.getValue();
- if (knob.equals(BugzillaOperation.reassign.toString())) {
- knob = BugzillaAttribute.ASSIGNED_TO.getKey();
- }
- fields.put(knob, new NameValuePair(knob, sel));
- }
- }
- }
- }
- if (model.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW) != null
- && model.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW).getValue().length() > 0) {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, model.getRoot().getMappedAttribute(
- TaskAttribute.COMMENT_NEW).getValue()));
- } else if (attributeOperation != null
- && attributeOperation.getValue().equals(BugzillaOperation.duplicate.toString())) {
- // fix for bug#198677
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, "")); //$NON-NLS-1$
- }
- }
- } else {
- // A token is required for bugzilla 3.2.1 and newer
- tokenRequired = bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_2) > 0;
- String fieldName = BugzillaAttribute.BUG_STATUS.getKey();
- TaskAttribute attributeStatus = model.getRoot().getMappedAttribute(TaskAttribute.STATUS);
- TaskAttribute attributeOperation = model.getRoot().getMappedAttribute(TaskAttribute.OPERATION);
- if (attributeOperation == null) {
- fields.put(fieldName, new NameValuePair(fieldName, attributeStatus.getValue()));
- } else {
- TaskAttribute originalOperation = model.getRoot().getAttribute(
- TaskAttribute.PREFIX_OPERATION + attributeOperation.getValue());
- if (originalOperation == null) {
- // Work around for bug#241012
- fields.put(fieldName, new NameValuePair(fieldName, attributeStatus.getValue()));
- } else {
- String inputAttributeId = originalOperation.getMetaData().getValue(
- TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID);
- if (originalOperation == null) {
- fields.put(fieldName, new NameValuePair(fieldName, attributeStatus.getValue()));
- } else {
- String selOp = attributeOperation.getValue().toUpperCase();
- if (selOp.equals("NONE")) { //$NON-NLS-1$
- selOp = attributeStatus.getValue();
- }
- if (selOp.equals("ACCEPT")) { //$NON-NLS-1$
- selOp = "ASSIGNED"; //$NON-NLS-1$
- }
- if (selOp.equals("RESOLVE")) { //$NON-NLS-1$
- selOp = "RESOLVED"; //$NON-NLS-1$
- }
- if (selOp.equals("VERIFY")) { //$NON-NLS-1$
- selOp = "VERIFIED"; //$NON-NLS-1$
- }
- if (selOp.equals("CLOSE")) { //$NON-NLS-1$
- selOp = "CLOSED"; //$NON-NLS-1$
- }
- if (selOp.equals("REOPEN")) { //$NON-NLS-1$
- selOp = "REOPENED"; //$NON-NLS-1$
- }
- if (selOp.equals("DUPLICATE")) { //$NON-NLS-1$
- selOp = "RESOLVED"; //$NON-NLS-1$
- String knob = BugzillaAttribute.RESOLUTION.getKey();
- fields.put(knob, new NameValuePair(knob, "DUPLICATE")); //$NON-NLS-1$
- }
-
- fields.put(fieldName, new NameValuePair(fieldName, selOp));
- if (inputAttributeId != null && !inputAttributeId.equals("")) { //$NON-NLS-1$
- TaskAttribute inputAttribute = attributeOperation.getTaskData().getRoot().getAttribute(
- inputAttributeId);
- if (inputAttribute != null) {
- if (inputAttribute.getOptions().size() > 0) {
- String sel = inputAttribute.getValue();
- String knob = inputAttribute.getId();
- if (knob.equals(BugzillaOperation.resolve.getInputId())) {
- knob = BugzillaAttribute.RESOLUTION.getKey();
- }
- fields.put(knob, new NameValuePair(knob, inputAttribute.getOption(sel)));
- } else {
- String sel = inputAttribute.getValue();
- String knob = attributeOperation.getValue();
- if (knob.equals("duplicate")) { //$NON-NLS-1$
- knob = inputAttributeId;
- }
- if (knob.equals(BugzillaOperation.reassign.toString())) {
- knob = BugzillaAttribute.ASSIGNED_TO.getKey();
- }
- fields.put(knob, new NameValuePair(knob, sel));
- }
- }
- }
- }
- }
- }
-
- if (model.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW) != null
- && model.getRoot().getMappedAttribute(TaskAttribute.COMMENT_NEW).getValue().length() > 0) {
- fields.put(KEY_COMMENT, new NameValuePair(KEY_COMMENT, model.getRoot().getMappedAttribute(
- TaskAttribute.COMMENT_NEW).getValue()));
- }
- }
-
- if (model.getRoot().getMappedAttribute(BugzillaAttribute.SHORT_DESC.getKey()) != null) {
- fields.put(KEY_SHORT_DESC, new NameValuePair(KEY_SHORT_DESC, model.getRoot().getMappedAttribute(
- BugzillaAttribute.SHORT_DESC.getKey()).getValue()));
- }
-
- TaskAttribute attributeRemoveCC = model.getRoot().getMappedAttribute(BugzillaAttribute.REMOVECC.getKey());
- if (attributeRemoveCC != null) {
- List<String> removeCC = attributeRemoveCC.getValues();
- if (removeCC != null && removeCC.size() > 0) {
- String[] s = new String[removeCC.size()];
- fields.put(KEY_CC, new NameValuePair(KEY_CC, toCommaSeparatedList(removeCC.toArray(s))));
- fields.put(BugzillaAttribute.REMOVECC.getKey(), new NameValuePair(BugzillaAttribute.REMOVECC.getKey(),
- VAL_TRUE));
- }
- }
-
- // check for security token (required for successful submit on Bugzilla 3.2.1 and greater but not in xml until Bugzilla 3.2.3 bug#263318)
-
- if (groupSecurityEnabled || (!tokenFound && tokenRequired)) {
- // get security and token if exists from html and include in post
- HtmlInformation htmlInfo = getHtmlOnlyInformation(model, monitor);
-
- if (groupSecurityEnabled) {
- for (String key : htmlInfo.getGroups().keySet()) {
- fields.put(key, new NameValuePair(key, htmlInfo.getGroups().get(key)));
- }
- }
- if (htmlInfo.getToken() != null && htmlInfo.getToken().length() > 0 && tokenRequired) {
- NameValuePair tokenPair = fields.get(BugzillaAttribute.TOKEN.getKey());
- if (tokenPair != null) {
- tokenPair.setValue(htmlInfo.getToken());
- } else {
- fields.put(BugzillaAttribute.TOKEN.getKey(), new NameValuePair(BugzillaAttribute.TOKEN.getKey(),
- htmlInfo.getToken()));
- }
- }
- }
- return fields.values().toArray(new NameValuePair[fields.size()]);
-
- }
-
- private HtmlInformation getHtmlOnlyInformation(TaskData taskData, IProgressMonitor monitor) throws CoreException {
- HtmlInformation htmlInfo = new HtmlInformation();
- authenticate(new SubProgressMonitor(monitor, 1));
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
-
- String bugUrl = taskData.getRepositoryUrl() + IBugzillaConstants.URL_GET_SHOW_BUG + taskData.getTaskId();
- GzipGetMethod getMethod = new GzipGetMethod(WebUtil.getRequestPath(bugUrl), false);
- getMethod.setRequestHeader("Content-Type", "text/xml; charset=" + getCharacterEncoding()); //$NON-NLS-1$ //$NON-NLS-2$
- httpClient.getParams().setParameter("http.protocol.single-cookie-header", true); //$NON-NLS-1$
- getMethod.setDoAuthentication(true);
-
- int code;
- InputStream inStream = null;
- try {
- code = WebUtil.execute(httpClient, hostConfiguration, getMethod, monitor);
- if (code == HttpURLConnection.HTTP_OK) {
- inStream = getResponseStream(getMethod, monitor);
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(new BufferedReader(new InputStreamReader(
- inStream, getCharacterEncoding())), null);
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.INPUT
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- HtmlTag tag = (HtmlTag) token.getValue();
- // String name = tag.getAttribute("name");
- String id = tag.getAttribute("id"); //$NON-NLS-1$
- String checkedValue = tag.getAttribute("checked"); //$NON-NLS-1$
- String type = tag.getAttribute("type"); //$NON-NLS-1$
- String name = tag.getAttribute("name"); //$NON-NLS-1$
- String value = tag.getAttribute("value"); //$NON-NLS-1$
- if (type != null && type.equalsIgnoreCase("checkbox") && id != null && id.startsWith("bit-")) { //$NON-NLS-1$ //$NON-NLS-2$
- htmlInfo.getGroups().put(id, checkedValue);
- } else if (name != null && name.equalsIgnoreCase(BugzillaAttribute.TOKEN.getKey())
- && value != null && value.length() > 0) {
- htmlInfo.setToken(value);
- }
- }
- }
- }
- } catch (Exception e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve group security information", e)); //$NON-NLS-1$
- } finally {
- if (inStream != null) {
- try {
- inStream.close();
- } catch (IOException e) {
- //ignore
- }
- }
- }
- return htmlInfo;
- }
-
- public static String stripTimeZone(String longTime) {
- String result = longTime;
- if (longTime != null) {
- String[] values = longTime.split(" "); //$NON-NLS-1$
- if (values != null && values.length > 2) {
- result = values[0] + " " + values[1]; //$NON-NLS-1$
- }
- }
- return result;
- }
-
- private static String toCommaSeparatedList(String[] strings) {
- StringBuffer buffer = new StringBuffer();
- for (int i = 0; i < strings.length; i++) {
- buffer.append(strings[i]);
- if (i != strings.length - 1) {
- buffer.append(","); //$NON-NLS-1$
- }
- }
- return buffer.toString();
- }
-
- /**
- * Utility method for determining what potential error has occurred from a bugzilla html reponse page
- */
- private void parseHtmlError(InputStream inputStream) throws IOException, CoreException {
-
- BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, getCharacterEncoding()));
- parseHtmlError(in);
- }
-
- private void parseHtmlError(BufferedReader in) throws IOException, CoreException {
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
-
- boolean isTitle = false;
- String title = ""; //$NON-NLS-1$
- String body = ""; //$NON-NLS-1$
-
- try {
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- body += token.toString();
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.TITLE
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isTitle = true;
- continue;
- }
-
- if (isTitle) {
- // get all of the data in the title tag
- if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase(Locale.ENGLISH) + " "; //$NON-NLS-1$
- continue;
- } else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
-
- boolean found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_ERROR_LOGIN).iterator(); iterator.hasNext() && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(), title));
- }
- found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_ERROR_COLLISION).iterator(); iterator.hasNext()
- && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.REPOSITORY_COLLISION, repositoryUrl.toString()));
- }
- found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_ERROR_COMMENT_REQUIRED).iterator(); iterator.hasNext()
- && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- throw new CoreException(new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.REPOSITORY_COMMENT_REQUIRED));
- }
- found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_SUSPICIOUS_ACTION).iterator(); iterator.hasNext()
- && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- IBugzillaConstants.REPOSITORY_STATUS_SUSPICIOUS_ACTION));
- }
- found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_ERROR_LOGGED_OUT).iterator(); iterator.hasNext()
- && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- loggedIn = false;
- // throw new
- // BugzillaException(IBugzillaConstants.LOGGED_OUT);
- throw new CoreException(new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.REPOSITORY_LOGGED_OUT,
- "You have been logged out. Please retry operation.")); //$NON-NLS-1$
- }
- found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_CHANGES_SUBMITTED).iterator(); iterator.hasNext()
- && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- return;
- }
- isTitle = false;
- }
- }
- }
-
- throw new CoreException(RepositoryStatus.createHtmlStatus(repositoryUrl.toString(), IStatus.INFO,
- BugzillaCorePlugin.ID_PLUGIN, RepositoryStatus.ERROR_REPOSITORY,
- "A repository error has occurred.", body)); //$NON-NLS-1$
-
- } catch (ParseException e) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$ //$NON-NLS-2$
- } finally {
- in.close();
- }
- }
-
- public TaskHistory getHistory(String taskId, IProgressMonitor monitor) throws IOException, CoreException {
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- authenticate(monitor);
- GzipGetMethod method = null;
- try {
- String url = repositoryUrl + IBugzillaConstants.SHOW_ACTIVITY + taskId;
- method = getConnectGzip(url, monitor);
- if (method != null) {
- InputStream in = getResponseStream(method, monitor);
- try {
- BugzillaTaskHistoryParser parser = new BugzillaTaskHistoryParser(in, getCharacterEncoding());
- try {
- return parser.retrieveHistory(bugzillaLanguageSettings);
- } catch (LoginException e) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- IBugzillaConstants.INVALID_CREDENTIALS));
- } catch (ParseException e) {
- loggedIn = false;
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " //$NON-NLS-1$
- + repositoryUrl.toString() + ".")); //$NON-NLS-1$
- }
- } finally {
- in.close();
- }
- }
-
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return null;
- }
-
- public void getTaskData(Set<String> taskIds, final TaskDataCollector collector, final TaskAttributeMapper mapper,
- final IProgressMonitor monitor) throws IOException, CoreException {
-
- if (repositoryConfiguration == null) {
- getRepositoryConfiguration(new SubProgressMonitor(monitor, 1));
- BugzillaCorePlugin.addRepositoryConfiguration(repositoryConfiguration);
- }
-
- GzipPostMethod method = null;
- HashMap<String, TaskData> taskDataMap = new HashMap<String, TaskData>();
- // make a copy to modify set
- taskIds = new HashSet<String>(taskIds);
- int authenticationAttempt = 0;
- while (taskIds.size() > 0) {
-
- try {
-
- Set<String> idsToRetrieve = new HashSet<String>();
- Iterator<String> itr = taskIds.iterator();
- for (int x = 0; itr.hasNext() && x < MAX_RETRIEVED_PER_QUERY; x++) {
- idsToRetrieve.add(itr.next());
- }
-
- NameValuePair[] formData = new NameValuePair[idsToRetrieve.size() + 2];
-
- if (idsToRetrieve.size() == 0) {
- return;
- }
-
- itr = idsToRetrieve.iterator();
- int x = 0;
- for (; itr.hasNext(); x++) {
- String taskId = itr.next();
- formData[x] = new NameValuePair("id", taskId); //$NON-NLS-1$
- TaskData taskData = new TaskData(mapper, getConnectorKind(), repositoryUrl.toString(), taskId);
- setupExistingBugAttributes(repositoryUrl.toString(), taskData);
- taskDataMap.put(taskId, taskData);
- }
- formData[x++] = new NameValuePair("ctype", "xml"); //$NON-NLS-1$ //$NON-NLS-2$
- formData[x] = new NameValuePair("excludefield", "attachmentdata"); //$NON-NLS-1$ //$NON-NLS-2$
- method = postFormData(IBugzillaConstants.URL_POST_SHOW_BUG, formData, monitor);
- if (method == null) {
- throw new IOException("Could not post form, client returned null method."); //$NON-NLS-1$
- }
-
- boolean parseable = false;
- if (method.getResponseHeader("Content-Type") != null) { //$NON-NLS-1$
- Header responseTypeHeader = method.getResponseHeader("Content-Type"); //$NON-NLS-1$
- for (String type : VALID_CONFIG_CONTENT_TYPES) {
- if (responseTypeHeader.getValue().toLowerCase(Locale.ENGLISH).contains(type)) {
- InputStream input = getResponseStream(method, monitor);
- try {
- MultiBugReportFactory factory = new MultiBugReportFactory(input, getCharacterEncoding());
- List<BugzillaCustomField> customFields = new ArrayList<BugzillaCustomField>();
- if (repositoryConfiguration != null) {
- customFields = repositoryConfiguration.getCustomFields();
- }
- factory.populateReport(taskDataMap, collector, mapper, customFields);
- taskIds.removeAll(idsToRetrieve);
- taskDataMap.clear();
- parseable = true;
- break;
- } finally {
- input.close();
- }
- }
- }
- }
-
- if (!parseable) {
- parseHtmlError(getResponseStream(method, monitor));
- break;
- }
- } catch (CoreException c) {
- if (c.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN && authenticationAttempt < 1) {
- loggedIn = false;
- authenticationAttempt++;
- //StatusHandler.log(c.getStatus());
- } else {
- throw c;
- }
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- }
- }
-
- protected String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- public String getConfigurationTimestamp(IProgressMonitor monitor) throws CoreException {
- if (!lastModifiedSupported) {
- return null;
- }
- String lastModified = null;
- HeadMethod method = null;
- try {
- method = connectHead(repositoryUrl + IBugzillaConstants.URL_GET_CONFIG_RDF, monitor);
-
- Header lastModifiedHeader = method.getResponseHeader("Last-Modified"); //$NON-NLS-1$
- if (lastModifiedHeader != null && lastModifiedHeader.getValue() != null
- && lastModifiedHeader.getValue().length() > 0) {
- lastModified = lastModifiedHeader.getValue();
- } else {
- lastModifiedSupported = false;
- }
-
- } catch (Exception e) {
-
- lastModifiedSupported = false;
-
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Error retrieving configuration timestamp", e)); //$NON-NLS-1$
- } finally {
- if (method != null) {
- method.releaseConnection();
- }
- }
- return lastModified;
- }
-
- private HeadMethod connectHead(String requestURL, IProgressMonitor monitor) throws IOException, CoreException {
- hostConfiguration = WebUtil.createHostConfiguration(httpClient, location, monitor);
- for (int attempt = 0; attempt < 2; attempt++) {
- // force authentication
- authenticate(monitor);
-
- HeadMethod headMethod = new HeadMethod(WebUtil.getRequestPath(requestURL));
- if (requestURL.contains(QUERY_DELIMITER)) {
- headMethod.setQueryString(requestURL.substring(requestURL.indexOf(QUERY_DELIMITER)));
- }
-
- headMethod.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=" //$NON-NLS-1$ //$NON-NLS-2$
- + getCharacterEncoding());
-
- // WARNING!! Setting browser compatability breaks Bugzilla
- // authentication
- // getMethod.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
-
-// headMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new BugzillaRetryHandler());
- headMethod.setDoAuthentication(true);
-
- int code;
- try {
- code = WebUtil.execute(httpClient, hostConfiguration, headMethod, monitor);
- } catch (IOException e) {
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repositoryUrl.toString(), e));
- }
-
- if (code == HttpURLConnection.HTTP_OK) {
- return headMethod;
- } else if (code == HttpURLConnection.HTTP_UNAUTHORIZED || code == HttpURLConnection.HTTP_FORBIDDEN) {
- headMethod.getResponseBody();
- // login or reauthenticate due to an expired session
- headMethod.releaseConnection();
- loggedIn = false;
- authenticate(monitor);
- } else if (code == HttpURLConnection.HTTP_PROXY_AUTH) {
- loggedIn = false;
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, repositoryUrl.toString(),
- "Proxy authentication required")); //$NON-NLS-1$
- } else {
- headMethod.getResponseBody();
- headMethod.releaseConnection();
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_NETWORK, "Http error: " + HttpStatus.getStatusText(code))); //$NON-NLS-1$
- // throw new IOException("HttpClient connection error response
- // code: " + code);
- }
- }
-
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "All connection attempts to " + repositoryUrl.toString() //$NON-NLS-1$
- + " failed. Please verify connection and authentication information.")); //$NON-NLS-1$
- }
-
- public void setRepositoryConfiguration(RepositoryConfiguration repositoryConfiguration) {
- this.repositoryConfiguration = repositoryConfiguration;
- }
-
- public RepositoryConfiguration getRepositoryConfiguration() {
- return repositoryConfiguration;
- }
-
- /**
- * Break text up into lines so that it is displayed properly in bugzilla
- */
- public static String formatTextToLineWrap(String origText, boolean hardWrap) {
- if (!hardWrap) {
- return origText;
- } else {
- String newText = ""; //$NON-NLS-1$
-
- while (!origText.equals("")) { //$NON-NLS-1$
- int newLine = origText.indexOf('\n');
- if (newLine == -1 || newLine > WRAP_LENGTH) {
- if (origText.length() > WRAP_LENGTH) {
- int spaceIndex = origText.lastIndexOf(" ", WRAP_LENGTH); //$NON-NLS-1$
- if (spaceIndex == -1) {
- spaceIndex = origText.indexOf(" ", WRAP_LENGTH); //$NON-NLS-1$
- if (spaceIndex == -1) {
- spaceIndex = newLine;
- }
- }
- newText = newText + origText.substring(0, spaceIndex) + "\n"; //$NON-NLS-1$
- if (origText.charAt(spaceIndex) == ' ' || origText.charAt(spaceIndex) == '\n') {
- origText = origText.substring(spaceIndex + 1, origText.length());
- } else {
- origText = origText.substring(spaceIndex, origText.length());
- }
- } else {
- newText = newText + origText;
- origText = ""; //$NON-NLS-1$
- }
- } else {
- newText = newText + origText.substring(0, newLine + 1);
- origText = origText.substring(newLine + 1, origText.length());
- }
- }
- return newText;
- }
- }
-
- public static boolean isValidUrl(String url) {
- if (url.startsWith("https://") || url.startsWith("http://")) { //$NON-NLS-1$//$NON-NLS-2$
- try {
- new URI(url, true, "UTF-8"); //$NON-NLS-1$
- return true;
- } catch (Exception e) {
- return false;
- }
- }
- return false;
- }
-
- private class HtmlInformation {
- private final Map<String, String> groups;
-
- private String token;
-
- public HtmlInformation() {
- groups = new HashMap<String, String>();
- }
-
- public Map<String, String> getGroups() {
- return groups;
- }
-
- public void setToken(String token) {
- this.token = token;
- }
-
- public String getToken() {
- return token;
- }
-
- }
-
- private void parseResultOK(BufferedReader in, BugzillaRepositoryResponse response) throws IOException,
- CoreException {
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
-
- boolean isDT = false;
- String dtString = ""; //$NON-NLS-1$
- String body = ""; //$NON-NLS-1$
- String lastDTValue = ""; //$NON-NLS-1$
- boolean isCode = false;
- String codeString = ""; //$NON-NLS-1$
- try {
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- body += token.toString();
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.DT
- && ((HtmlTag) (token.getValue())).isEndTag()) {
- isDT = false;
- if (!dtString.equals("")) { //$NON-NLS-1$
- lastDTValue = dtString;
- }
- dtString = ""; //$NON-NLS-1$
- continue;
- }
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.CODE
- && ((HtmlTag) (token.getValue())).isEndTag()) {
- isCode = false;
- if (codeString.length() > 0) {
- codeString = codeString.replace("&#64;", "@"); //$NON-NLS-1$ //$NON-NLS-2$
- response.addResponseData(lastDTValue, codeString);
- }
- dtString = ""; //$NON-NLS-1$
- codeString = ""; //$NON-NLS-1$
- continue;
- }
- if (isCode) {
- codeString += (" " + token.getValue()); //$NON-NLS-1$
- }
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.CODE
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isCode = true;
- codeString = ""; //$NON-NLS-1$
- }
- if (isDT) {
- if (dtString.length() > 0) {
- dtString += (" " + token.getValue()); //$NON-NLS-1$
- } else {
- dtString += token.getValue();
- }
- }
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.DT
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isDT = true;
- continue;
- }
- }
- } catch (ParseException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_INTERNAL, "Unable to parse response from " + repositoryUrl.toString() + ".")); //$NON-NLS-1$ //$NON-NLS-2$
- } finally {
- in.close();
- in.read();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
deleted file mode 100644
index 09fd7f879..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientFactory.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.net.MalformedURLException;
-
-import org.eclipse.mylyn.commons.net.AbstractWebLocation;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.TaskRepositoryLocationFactory;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves (adaption for Bugzilla)
- */
-public class BugzillaClientFactory {
-
- protected static TaskRepositoryLocationFactory taskRepositoryLocationFactory = new TaskRepositoryLocationFactory();
-
- public static BugzillaClient createClient(TaskRepository taskRepository) throws MalformedURLException {
- String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language == null || language.equals("")) { //$NON-NLS-1$
- language = IBugzillaConstants.DEFAULT_LANG;
- }
- BugzillaLanguageSettings languageSettings = BugzillaRepositoryConnector.getLanguageSetting(language);
- AbstractWebLocation location = taskRepositoryLocationFactory.createWebLocation(taskRepository);
- BugzillaClient client = new BugzillaClient(location, taskRepository.getCharacterEncoding(),
- taskRepository.getProperties(), languageSettings);
- return client;
-
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
deleted file mode 100644
index 6c13f3d89..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaClientManager.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.net.MalformedURLException;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.tasks.core.IRepositoryListener;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-
-/**
- * @author Steffen Pingel
- * @author Robert Elves (adaption for Bugzilla)
- */
-public class BugzillaClientManager implements IRepositoryListener {
-
- private final Map<String, BugzillaClient> clientByUrl = new HashMap<String, BugzillaClient>();
-
- public BugzillaClientManager() {
- }
-
- public BugzillaClient getClient(TaskRepository taskRepository, IProgressMonitor monitor) throws CoreException {
- BugzillaClient client;
- synchronized (clientByUrl) {
- client = clientByUrl.get(taskRepository.getRepositoryUrl());
- if (client == null) {
- String language = taskRepository.getProperty(IBugzillaConstants.BUGZILLA_LANGUAGE_SETTING);
- if (language == null || language.equals("")) { //$NON-NLS-1$
- language = IBugzillaConstants.DEFAULT_LANG;
- }
- try {
- client = createClient(taskRepository);
- } catch (MalformedURLException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Malformed Repository Url", e)); //$NON-NLS-1$
- }
- clientByUrl.put(taskRepository.getRepositoryUrl(), client);
- }
- RepositoryConfiguration config = BugzillaCorePlugin.getRepositoryConfiguration(taskRepository.getUrl());
- client.setRepositoryConfiguration(config);
- }
- return client;
- }
-
- protected BugzillaClient createClient(TaskRepository taskRepository) throws MalformedURLException {
- return BugzillaClientFactory.createClient(taskRepository);
- }
-
- public void repositoryAdded(TaskRepository repository) {
- // make sure there is no stale client still in the cache, bug #149939
- removeClient(repository);
- }
-
- public void repositoryRemoved(TaskRepository repository) {
- removeClient(repository);
- }
-
- private void removeClient(TaskRepository repository) {
- synchronized (clientByUrl) {
- clientByUrl.remove(repository.getRepositoryUrl());
- }
- }
-
- public void repositorySettingsChanged(TaskRepository repository) {
- removeClient(repository);
- }
-
- public void repositoryUrlChanged(TaskRepository repository, String oldUrl) {
- // ignore
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
deleted file mode 100644
index 038a47cb5..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCorePlugin.java
+++ /dev/null
@@ -1,447 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-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.Plugin;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.osgi.framework.BundleContext;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaCorePlugin extends Plugin {
-
- private static final String ERROR_DELETING_CONFIGURATION = "Error removing corrupt repository configuration file."; //$NON-NLS-1$
-
- private static final String ERROR_INCOMPATIBLE_CONFIGURATION = "Reset Bugzilla repository configuration cache due to format change"; //$NON-NLS-1$
-
- public static final String CONNECTOR_KIND = "bugzilla"; //$NON-NLS-1$
-
- public static final String ID_PLUGIN = "org.eclipse.mylyn.bugzilla"; //$NON-NLS-1$
-
- private static BugzillaCorePlugin INSTANCE;
-
- private static boolean cacheFileRead = false;
-
- private static File repositoryConfigurationFile = null;
-
- private static BugzillaRepositoryConnector connector;
-
- private static final String OPTION_ALL = "All"; //$NON-NLS-1$
-
- // A Map from Java's Platform to Buzilla's
- private final Map<String, String> java2buzillaPlatformMap = new HashMap<String, String>();
-
- /** Product configuration for the current server */
- private static Map<String, RepositoryConfiguration> repositoryConfigurations = new HashMap<String, RepositoryConfiguration>();
-
- public BugzillaCorePlugin() {
- super();
- java2buzillaPlatformMap.put("x86", "PC"); // can be PC or Macintosh! //$NON-NLS-1$ //$NON-NLS-2$
- java2buzillaPlatformMap.put("x86_64", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
- java2buzillaPlatformMap.put("ia64", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
- java2buzillaPlatformMap.put("ia64_32", "PC"); //$NON-NLS-1$ //$NON-NLS-2$
- java2buzillaPlatformMap.put("sparc", "Sun"); //$NON-NLS-1$ //$NON-NLS-2$
- java2buzillaPlatformMap.put("ppc", "Power PC"); // not Power! //$NON-NLS-1$ //$NON-NLS-2$
-
- }
-
- public static BugzillaCorePlugin getDefault() {
- return INSTANCE;
- }
-
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- INSTANCE = this;
- }
-
- @Override
- public void stop(BundleContext context) throws Exception {
- writeRepositoryConfigFile();
-
- INSTANCE = null;
- super.stop(context);
- }
-
- static void setConnector(BugzillaRepositoryConnector theConnector) {
- connector = theConnector;
- }
-
- public static Map<String, RepositoryConfiguration> getConfigurations() {
- readRepositoryConfigurationFile();
- return repositoryConfigurations;
- }
-
- public static void setConfigurationCacheFile(File file) {
- repositoryConfigurationFile = file;
- }
-
- /**
- * @since 2.1
- * @return cached repository configuration. If not already cached, null is returned.
- */
- public static RepositoryConfiguration getRepositoryConfiguration(String repositoryUrl) {
- readRepositoryConfigurationFile();
- return repositoryConfigurations.get(repositoryUrl);
- }
-
- /**
- * Retrieves the latest repository configuration from the server
- */
- public static RepositoryConfiguration getRepositoryConfiguration(TaskRepository repository, boolean forceRefresh,
- IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- readRepositoryConfigurationFile();
- RepositoryConfiguration configuration;
- configuration = repositoryConfigurations.get(repository.getRepositoryUrl());
- if (configuration == null || forceRefresh) {
- synchronized (repositoryConfigurations) {
- // check if another thread already retrieved configuration
- configuration = repositoryConfigurations.get(repository.getRepositoryUrl());
- if (configuration == null || forceRefresh) {
- BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
- configuration = client.getRepositoryConfiguration(monitor);
- if (configuration != null) {
- internalAddConfiguration(configuration);
- }
- }
- }
- }
- return configuration;//repositoryConfigurations.get(repository.getRepositoryUrl());
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 1,
- "Error retrieving task attributes from repository.\n\n" + e.getMessage(), e)); //$NON-NLS-1$
- }
- }
-
- public static void addRepositoryConfiguration(RepositoryConfiguration config) {
- if (config != null) {
- readRepositoryConfigurationFile();
- synchronized (repositoryConfigurations) {
- internalAddConfiguration(config);
- }
- }
- }
-
- private static void internalAddConfiguration(RepositoryConfiguration config) {
- repositoryConfigurations.remove(config.getRepositoryUrl());
- repositoryConfigurations.put(config.getRepositoryUrl(), config);
- }
-
- // /**
- // * Returns the path to the file cacheing the product configuration.
- // */
- // private static IPath getProductConfigurationCachePath() {
- // IPath stateLocation =
- // Platform.getStateLocation(BugzillaPlugin.getDefault().getBundle());
- // IPath configFile = stateLocation.append("repositoryConfigurations");
- // return configFile;
- // }
-
- /** public for testing */
- public static void removeConfiguration(RepositoryConfiguration config) {
- synchronized (repositoryConfigurations) {
- repositoryConfigurations.remove(config.getRepositoryUrl());
- }
- }
-
- /** public for testing */
- public static synchronized void readRepositoryConfigurationFile() {
-
- // IPath configFile = getProductConfigurationCachePath();
- if (cacheFileRead || repositoryConfigurationFile == null || !repositoryConfigurationFile.exists()) {
- return;
- }
-
- synchronized (repositoryConfigurations) {
- ObjectInputStream in = null;
- try {
- in = new ObjectInputStream(new FileInputStream(repositoryConfigurationFile));
- int size = in.readInt();
- for (int nX = 0; nX < size; nX++) {
- RepositoryConfiguration item = (RepositoryConfiguration) in.readObject();
- if (item != null) {
- repositoryConfigurations.put(item.getRepositoryUrl(), item);
- }
- }
- } catch (Exception e) {
- log(new Status(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN, ERROR_INCOMPATIBLE_CONFIGURATION));
- try {
- if (in != null) {
- in.close();
- }
- if (repositoryConfigurationFile != null && repositoryConfigurationFile.exists()) {
- if (repositoryConfigurationFile.delete()) {
- // successfully deleted
- } else {
- log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 0,
- ERROR_DELETING_CONFIGURATION, e));
- }
- }
-
- } catch (Exception ex) {
- log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 0, ERROR_DELETING_CONFIGURATION, e));
- }
- } finally {
- cacheFileRead = true;
- if (in != null) {
- try {
- in.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
- }
-
- /** public for testing */
- public static void writeRepositoryConfigFile() {
- if (repositoryConfigurationFile != null) {
- ObjectOutputStream out = null;
- try {
- Set<RepositoryConfiguration> tempConfigs;
- synchronized (repositoryConfigurations) {
- tempConfigs = new HashSet<RepositoryConfiguration>(repositoryConfigurations.values());
- }
- if (tempConfigs.size() > 0) {
- out = new ObjectOutputStream(new FileOutputStream(repositoryConfigurationFile));
- out.writeInt(tempConfigs.size());
- for (RepositoryConfiguration repositoryConfiguration : tempConfigs) {
- if (repositoryConfiguration != null) {
- out.writeObject(repositoryConfiguration);
- }
- }
- }
- } catch (IOException e) {
- log(e);
- } finally {
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- // ignore
- }
- }
- }
- }
- }
-
- /**
- * Convenience method for logging statuses to the plugin log
- *
- * @param status
- * the status to log
- */
- public static void log(IStatus status) {
- getDefault().getLog().log(status);
- }
-
- /**
- * Convenience method for logging exceptions to the plugin log
- *
- * @param e
- * the exception to log
- */
- public static void log(Exception e) {
- String message = e.getMessage();
- if (e.getMessage() == null) {
- message = e.getClass().toString();
- }
- log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, 0, message, e));
- }
-
- /**
- * Returns the path to the file caching bug reports created while offline.
- */
- protected IPath getCachedBugReportPath() {
- IPath stateLocation = Platform.getStateLocation(BugzillaCorePlugin.getDefault().getBundle());
- IPath bugFile = stateLocation.append("bugReports"); //$NON-NLS-1$
- return bugFile;
- }
-
- public void setPlatformDefaultsOrGuess(TaskRepository repository, TaskData newBugModel) {
-
- String platform = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_PLATFORM);
- String os = repository.getProperty(IBugzillaConstants.BUGZILLA_DEF_OS);
-
- // set both or none
- if (null != os && null != platform) {
- TaskAttribute opSysAttribute = newBugModel.getRoot().getAttribute(BugzillaAttribute.OP_SYS.getKey());
- TaskAttribute platformAttribute = newBugModel.getRoot().getAttribute(
- BugzillaAttribute.REP_PLATFORM.getKey());
-
- // TODO something can still go wrong when the allowed values on the repository change...
- opSysAttribute.setValue(os);
- platformAttribute.setValue(platform);
- return;
- }
- // fall through to old code
- setPlatformOptions(newBugModel);
- }
-
- public void setPlatformOptions(TaskData newBugModel) {
- try {
-
- // Get OS Lookup Map
- // Check that the result is in Values, if it is not, set it to other
- // Defaults to the first of each (sorted) list All, All
- TaskAttribute opSysAttribute = newBugModel.getRoot().getAttribute(BugzillaAttribute.OP_SYS.getKey());
- TaskAttribute platformAttribute = newBugModel.getRoot().getAttribute(
- BugzillaAttribute.REP_PLATFORM.getKey());
-
- String OS = Platform.getOS();
- String platform = Platform.getOSArch();
- String ws = Platform.getWS();
-
- String bugzillaOS = null; // Bugzilla String for OS
- String bugzillaPlatform = null; // Bugzilla String for Platform
- String[] wsExtentions = null;
-/*
- AIX -> AIX
- Linux -> Linux
- HP-UX -> HP-UX
- Solaris -> Solaris
- MacOS X -> Mac OS X
- */
-
- if (ws.length() > 1) {
- char first = ws.charAt(0);
- char firstLower = Character.toLowerCase(first);
- char firstUpper = Character.toUpperCase(first);
- String[] wsExtentionsTemp = { " - " + firstUpper + ws.substring(1, ws.length()), //$NON-NLS-1$
- " - " + firstLower + ws.substring(1, ws.length()), //$NON-NLS-1$
- " " + firstUpper + ws.substring(1, ws.length()), //$NON-NLS-1$
- " " + firstLower + ws.substring(1, ws.length()), "" }; //$NON-NLS-1$//$NON-NLS-2$
- wsExtentions = wsExtentionsTemp;
- } else if (ws.length() == 1) {
- char first = ws.charAt(0);
- char firstLower = Character.toLowerCase(first);
- char firstUpper = Character.toUpperCase(first);
- String[] wsExtentionsTemp = { " - " + firstUpper, " - " + firstLower, " " + firstUpper, //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- " " + firstLower, "" }; //$NON-NLS-1$//$NON-NLS-2$
- wsExtentions = wsExtentionsTemp;
- } else {
- String[] wsExtentionsTemp = { "" }; //$NON-NLS-1$
- wsExtentions = wsExtentionsTemp;
- }
-
- bugzillaOS = System.getProperty("os.name") + " " + System.getProperty("os.version"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- // We start with the most specific Value as the Search String.
- // If we didn't find it we remove the last part of the version String or the OS Name from
- // the Search String and continue with the test until we found it or the Search String is empty.
- //
- // The search in casesensitive.
- if (opSysAttribute != null) {
- for (String element : wsExtentions) {
- String bugzillaOSTemp = bugzillaOS;
- while (bugzillaOSTemp != null && opSysAttribute.getOption(bugzillaOSTemp + element) == null) {
- int dotindex = bugzillaOSTemp.lastIndexOf('.');
- if (dotindex > 0) {
- bugzillaOSTemp = bugzillaOSTemp.substring(0, dotindex);
- } else {
- int spaceindex = bugzillaOSTemp.lastIndexOf(' ');
- if (spaceindex > 0) {
- bugzillaOSTemp = bugzillaOSTemp.substring(0, spaceindex);
- } else {
- bugzillaOSTemp = null;
- }
- }
- }
- if (bugzillaOSTemp != null) {
- bugzillaOS = bugzillaOSTemp + element;
- break;
- }
- }
- } else {
- bugzillaOS = null;
- }
-
- if (platform != null && java2buzillaPlatformMap.containsKey(platform)) {
- bugzillaPlatform = java2buzillaPlatformMap.get(platform);
- // Bugzilla knows the following Platforms [All, Macintosh, Other, PC, Power PC, Sun]
- // Platform.getOSArch() returns "x86" on Intel Mac's and "ppc" on Power Mac's
- // so bugzillaPlatform is "Power" or "PC".
- //
- // If the OS is "macosx" we change the Platform to "Macintosh"
- //
- if (bugzillaPlatform != null
- && (bugzillaPlatform.compareTo("Power") == 0 || bugzillaPlatform.compareTo("PC") == 0) //$NON-NLS-1$ //$NON-NLS-2$
- && OS != null && OS.compareTo("macosx") == 0) { //$NON-NLS-1$
- // TODO: this may not even be a legal value in another repository!
- bugzillaPlatform = "Macintosh"; //$NON-NLS-1$
- } else if (platformAttribute != null && platformAttribute.getOption(bugzillaPlatform) == null) {
- // If the platform we found is not int the list of available
- // optinos, set the
- // Bugzilla Platform to null, and juse use "other"
- bugzillaPlatform = null;
- }
- }
- // Set the OS and the Platform in the taskData
- if (bugzillaOS != null && opSysAttribute != null) {
- opSysAttribute.setValue(bugzillaOS);
- } else if (opSysAttribute != null && opSysAttribute.getOption(OPTION_ALL) != null) {
- opSysAttribute.setValue(OPTION_ALL);
- }
-
- if (bugzillaPlatform != null && platformAttribute != null) {
- platformAttribute.setValue(bugzillaPlatform);
- } else if (opSysAttribute != null && platformAttribute != null
- && platformAttribute.getOption(OPTION_ALL) != null) {
- opSysAttribute.setValue(OPTION_ALL);
- }
-
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, "could not set platform options", //$NON-NLS-1$
- e));
- }
- }
-
- public Set<BugzillaLanguageSettings> getLanguageSettings() {
- return BugzillaRepositoryConnector.getLanguageSettings();
- }
-
- public BugzillaLanguageSettings getLanguageSetting(String language) {
- return BugzillaRepositoryConnector.getLanguageSetting(language);
- }
-
- /**
- * this method is only for testing
- */
- public static void setCacheFileRead(boolean cacheFileRead) {
- BugzillaCorePlugin.cacheFileRead = cacheFileRead;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
deleted file mode 100644
index d906e8c8c..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaCustomField.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Frank Becker 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:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Class describing a custom Fields for a given Bugzilla installation.
- *
- * @author Frank Becker
- * @since 2.3
- */
-public class BugzillaCustomField implements Serializable {
-
- // old version private static final long serialVersionUID = 5703683576871326128L;
- // private static final long serialVersionUID = 7273310489883205486L;
-
- private static final long serialVersionUID = 8268371206426652131L;
-
- public static final String CUSTOM_FIELD_PREFIX = "cf_"; //$NON-NLS-1$
-
- public static enum FieldType {
- UNKNOWN, FreeText, DropDown, MultipleSelection, LargeText, DateTime;
-
- private static int parseInt(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- @Override
- public String toString() {
- switch (this.ordinal()) {
- case 1:
- return "Free Text"; //$NON-NLS-1$
- case 2:
- return "Drop Down"; //$NON-NLS-1$
- case 3:
- return "Multiple-Selection Box"; //$NON-NLS-1$
- case 4:
- return "Large Text Box"; //$NON-NLS-1$
- case 5:
- return "Date/Time"; //$NON-NLS-1$
- default:
- return super.toString();
- }
- }
-
- public static FieldType convert(String change) {
- switch (parseInt(change)) {
- case 1:
- return FreeText;
- case 2:
- return DropDown;
- case 3:
- return MultipleSelection;
- case 4:
- return LargeText;
- case 5:
- return DateTime;
- default:
- return UNKNOWN;
- }
- }
- }
-
- private final String name;
-
- private final String description;
-
- private List<String> options = new ArrayList<String>();
-
- final private int type;
-
- final private FieldType fieldType;
-
- final private boolean enterBug;
-
- public BugzillaCustomField(String description, String name, String type, String enterBug) {
- this.description = description;
- this.name = name;
- this.type = parseInt(type);
- this.fieldType = FieldType.convert(type);
- this.enterBug = "1".equals(enterBug); //$NON-NLS-1$
- }
-
- private int parseInt(String type) {
- try {
- return Integer.parseInt(type);
- } catch (NumberFormatException e) {
- return -1;
- }
- }
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public List<String> getOptions() {
- return options;
- }
-
- public void setOptions(List<String> options) {
- this.options = options;
- }
-
- public void addOption(String option) {
- this.options.add(option);
- }
-
- /**
- * @since 3.0.2
- * @deprecated use {@link #getFieldType()} instead
- */
- @Deprecated
- public int getType() {
- return type;
- }
-
- /**
- * @since 3.0.2
- * @deprecated use {@link #getFieldType().toString()} instead
- */
- @Deprecated
- public String getTypeDesc() {
- return getFieldType().toString();
- }
-
- /**
- * @since 3.0.2
- */
- public boolean isEnterBug() {
- return enterBug;
- }
-
- public FieldType getFieldType() {
- return fieldType;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
deleted file mode 100644
index 0c6a09001..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlag.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 Frank Becker 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:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaFlag implements Serializable {
-
-// old private static final long serialVersionUID = 4920551884607344418L;
- private static final long serialVersionUID = -3149026741475639885L;
-
- private final String name;
-
- private final String description;
-
- private final String type;
-
- private final boolean requestable;
-
- private final boolean specifically_requestable;
-
- private final boolean multiplicable;
-
- private final int flagId;
-
- private final Map<String, List<String>> used = new HashMap<String, List<String>>();
-
- public BugzillaFlag(String name, String description, String type, String requestable,
- String specifically_requestable, String multiplicable, int flagId) {
- this.description = description;
- this.name = name;
- this.type = type;
- this.flagId = flagId;
-
- if (multiplicable != null && !multiplicable.equals("")) { //$NON-NLS-1$
- this.multiplicable = multiplicable.equals("1"); //$NON-NLS-1$
- } else {
- this.multiplicable = false;
- }
-
- if (requestable != null && !requestable.equals("")) { //$NON-NLS-1$
- this.requestable = requestable.equals("1"); //$NON-NLS-1$
- } else {
- this.requestable = false;
- }
-
- if (specifically_requestable != null && !specifically_requestable.equals("")) { //$NON-NLS-1$
- this.specifically_requestable = specifically_requestable.equals("1"); //$NON-NLS-1$
- } else {
- this.specifically_requestable = false;
- }
- }
-
- public String getName() {
- return name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getType() {
- return type;
- }
-
- public boolean isRequestable() {
- return requestable;
- }
-
- public boolean isSpecifically_requestable() {
- return specifically_requestable;
- }
-
- public boolean isMultiplicable() {
- return multiplicable;
- }
-
- public int getFlagId() {
- return flagId;
- }
-
- public void addUsed(String product, String component) {
- List<String> componentList = used.get(product);
- if (componentList == null) {
- componentList = new ArrayList<String>();
- used.put(product, componentList);
- }
- if (!componentList.contains(component)) {
- componentList.add(component);
- }
- }
-
- public boolean isUsedIn(String product, String component) {
- List<String> componentList = used.get(product);
- if (componentList != null && componentList.contains(component)) {
- return true;
- }
- return false;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlagMapper.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlagMapper.java
deleted file mode 100644
index 995db308f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaFlagMapper.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMetaData;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-
-/**
- * @author Frank Becker
- * @since 3.1
- */
-public class BugzillaFlagMapper {
-
- private String requestee;
-
- private String setter;
-
- private String state;
-
- private String flagId;
-
- private int number;
-
- public String getRequestee() {
- return requestee;
- }
-
- public void setRequestee(String requestee) {
- this.requestee = requestee;
- }
-
- public String getSetter() {
- return setter;
- }
-
- public void setSetter(String setter) {
- this.setter = setter;
- }
-
- public String getState() {
- return state;
- }
-
- public void setState(String state) {
- this.state = state;
- }
-
- public String getFlagId() {
- return flagId;
- }
-
- public void setFlagId(String flagId) {
- this.flagId = flagId;
- }
-
- public int getNumber() {
- return number;
- }
-
- public void setNumber(int number) {
- this.number = number;
- }
-
- private String description;
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void applyTo(TaskAttribute taskAttribute) {
- Assert.isNotNull(taskAttribute);
- TaskData taskData = taskAttribute.getTaskData();
- TaskAttributeMapper mapper = taskData.getAttributeMapper();
- TaskAttributeMetaData meta = taskAttribute.getMetaData().defaults();
- meta.setType(IBugzillaConstants.EDITOR_TYPE_FLAG);
- meta.setLabel(description);
- BugzillaVersion bugzillaVersion = null;
- RepositoryConfiguration repositoryConfiguration;
- try {
- repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(mapper.getTaskRepository(), false,
- new NullProgressMonitor());
- bugzillaVersion = repositoryConfiguration.getInstallVersion();
- } catch (CoreException e) {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
-
- if (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_2) >= 0) {
- meta.setKind(TaskAttribute.KIND_DEFAULT);
- }
- meta.setReadOnly(false);
-
- if (getNumber() != 0) {
- TaskAttribute child = taskAttribute.createMappedAttribute("number"); //$NON-NLS-1$
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_INTEGER);
- mapper.setIntegerValue(child, getNumber());
- }
- if (getRequestee() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute("requestee"); //$NON-NLS-1$
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getRequestee());
- }
- if (getSetter() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute("setter"); //$NON-NLS-1$
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- mapper.setValue(child, getSetter());
- }
- if (getState() != null) {
- TaskAttribute child = taskAttribute.createMappedAttribute("state"); //$NON-NLS-1$
- child.getMetaData().defaults().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- child.getMetaData().setLabel(flagId);
- child.getMetaData().setReadOnly(false);
- mapper.setValue(child, getState());
- taskAttribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, "state"); //$NON-NLS-1$
-
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
deleted file mode 100644
index cb4ea1c32..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaLanguageSettings.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Frank Becker 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:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-/**
- * Class describing the html response of Bugzilla requests which are used within Mylyn.
- *
- * Strings should be in the language which is the default for an Bugzilla instance.
- *
- * @author Frank Becker
- */
-
-public class BugzillaLanguageSettings {
- private String languageName = "<unknown>"; //$NON-NLS-1$
-
- public static final String COMMAND_ERROR_LOGIN = "error_login"; //$NON-NLS-1$
-
- public static final String COMMAND_ERROR_COLLISION = "error_collision"; //$NON-NLS-1$
-
- public static final String COMMAND_ERROR_COMMENT_REQUIRED = "error_comment_required"; //$NON-NLS-1$
-
- public static final String COMMAND_ERROR_LOGGED_OUT = "error_logged_out"; //$NON-NLS-1$
-
- public static final String COMMAND_BAD_LOGIN = "bad_login"; //$NON-NLS-1$
-
- public static final String COMMAND_PROCESSED = "processed"; //$NON-NLS-1$
-
- public static final String COMMAND_CHANGES_SUBMITTED = "changes_submitted"; //$NON-NLS-1$
-
- public static final String COMMAND_SUSPICIOUS_ACTION = "suspicious_action"; //$NON-NLS-1$
-
- public static final String COMMAND_BUG = "bug"; //$NON-NLS-1$
-
- public static final String COMMAND_SUBMITTED = "submitted"; //$NON-NLS-1$
-
- private final Map<String, List<String>> languageAttributes = new LinkedHashMap<String, List<String>>();
-
- public BugzillaLanguageSettings(String languageName) {
- super();
- this.languageName = languageName;
- }
-
- public String getLanguageName() {
- return languageName;
- }
-
- @Override
- public int hashCode() {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((languageName == null) ? 0 : languageName.hashCode());
- return result;
- }
-
- @Override
- public boolean equals(Object obj) {
- if (this == obj) {
- return true;
- }
- if (obj == null) {
- return false;
- }
- if (getClass() != obj.getClass()) {
- return false;
- }
- BugzillaLanguageSettings other = (BugzillaLanguageSettings) obj;
- if (languageName == null) {
- if (other.languageName != null) {
- return false;
- }
- } else if (!languageName.equals(other.languageName)) {
- return false;
- }
- return true;
- }
-
- public void setLanguageName(String languageName) {
- this.languageName = languageName;
- }
-
- public void addLanguageAttribute(String command, String response) {
- List<String> commandList = languageAttributes.get(command);
- if (commandList == null) {
- commandList = new LinkedList<String>();
- languageAttributes.put(command.toLowerCase(), commandList);
- }
- commandList.add(response);
- }
-
- public List<String> getResponseForCommand(String command) {
- return languageAttributes.get(command);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
deleted file mode 100644
index a3e681d5d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaOperation.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public enum BugzillaOperation {
-
- none(Messages.BugzillaOperation_Leave_as_X_X),
-
- accept(Messages.BugzillaOperation_Accept_to_ASSIGNED),
-
- resolve(Messages.BugzillaOperation_Resolve_as, "resolutionInput", TaskAttribute.TYPE_SINGLE_SELECT), //$NON-NLS-1$
-
- duplicate(Messages.BugzillaOperation_Duplicate_of, "dup_id", TaskAttribute.TYPE_TASK_DEPENDENCY), //$NON-NLS-1$
-
- reassign(Messages.BugzillaOperation_Reassign_to, "reassignInput", TaskAttribute.TYPE_PERSON), //$NON-NLS-1$
-
- reassignbycomponent(Messages.BugzillaOperation_Reassign_to_default_assignee),
-
- reopen(Messages.BugzillaOperation_Reopen_bug),
-
- verify(Messages.BugzillaOperation_Mark_as_VERIFIED),
-
- close(Messages.BugzillaOperation_Mark_as_CLOSED);
-
- private final String label;
-
- private final String inputId;
-
- private final String inputType;
-
- BugzillaOperation(String label) {
- this(label, null, TaskAttribute.TYPE_SHORT_TEXT);
- }
-
- BugzillaOperation(String label, String inputId, String type) {
- this.label = label;
- this.inputId = inputId;
- this.inputType = type;
- }
-
- public String getLabel() {
- return label;
- }
-
- public String getInputId() {
- return inputId;
- }
-
- public String getInputType() {
- return inputType;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
deleted file mode 100644
index 92aaff357..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryConnector.java
+++ /dev/null
@@ -1,600 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.text.MessageFormat;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.commons.core.StatusHandler;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
-import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
-import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
-import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.data.TaskMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskRelation;
-import org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaRepositoryConnector extends AbstractRepositoryConnector {
-
- private static final String BUG_ID = "&bug_id="; //$NON-NLS-1$
-
- private static final String CHANGED_BUGS_CGI_ENDDATE = "&chfieldto=Now"; //$NON-NLS-1$
-
- private static final String CHANGED_BUGS_CGI_QUERY = "/buglist.cgi?query_format=advanced&chfieldfrom="; //$NON-NLS-1$
-
- private static final String CLIENT_LABEL = Messages.BugzillaRepositoryConnector_BUGZILLA_SUPPORTS_2_18_TO_3_0;
-
- private static final String COMMENT_FORMAT = "yyyy-MM-dd HH:mm"; //$NON-NLS-1$
-
- private static final String DEADLINE_FORMAT = "yyyy-MM-dd"; //$NON-NLS-1$
-
- private static final long HOUR = 1000 * 60 * 60;
-
- private final BugzillaTaskAttachmentHandler attachmentHandler = new BugzillaTaskAttachmentHandler(this);
-
- private final BugzillaTaskDataHandler taskDataHandler = new BugzillaTaskDataHandler(this);
-
- protected BugzillaClientManager clientManager;
-
- protected static BugzillaLanguageSettings enSetting;
-
- protected static final Set<BugzillaLanguageSettings> languages = new LinkedHashSet<BugzillaLanguageSettings>();
-
- @Override
- public String getLabel() {
- return CLIENT_LABEL;
- }
-
- @Override
- public AbstractTaskAttachmentHandler getTaskAttachmentHandler() {
- return attachmentHandler;
- }
-
- @Override
- public String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- @Override
- public void updateTaskFromTaskData(TaskRepository repository, ITask task, TaskData taskData) {
- TaskMapper scheme = getTaskMapping(taskData);
- scheme.applyTo(task);
-
- task.setUrl(BugzillaClient.getBugUrlWithoutLogin(repository.getRepositoryUrl(), taskData.getTaskId()));
-
- boolean isComplete = false;
- TaskAttribute attributeStatus = taskData.getRoot().getMappedAttribute(TaskAttribute.STATUS);
- if (attributeStatus != null) {
- isComplete = attributeStatus.getValue().equals(IBugzillaConstants.VALUE_STATUS_RESOLVED)
- || attributeStatus.getValue().equals(IBugzillaConstants.VALUE_STATUS_CLOSED)
- || attributeStatus.getValue().equals(IBugzillaConstants.VALUE_STATUS_VERIFIED);
- }
-
- if (taskData.isPartial()) {
- if (isComplete) {
- if (task.getCompletionDate() == null) {
- task.setCompletionDate(new Date(0));
- }
- } else {
- if (task.getCompletionDate() != null) {
- task.setCompletionDate(null);
- }
- }
- } else {
- // Completion Date
- if (isComplete) {
- Date completionDate = null;
-
- List<TaskAttribute> taskComments = taskData.getAttributeMapper().getAttributesByType(taskData,
- TaskAttribute.TYPE_COMMENT);
- if (taskComments != null && taskComments.size() > 0) {
- TaskAttribute lastComment = taskComments.get(taskComments.size() - 1);
- if (lastComment != null) {
- TaskAttribute attributeCommentDate = lastComment.getMappedAttribute(TaskAttribute.COMMENT_DATE);
- if (attributeCommentDate != null) {
- try {
- completionDate = new SimpleDateFormat(COMMENT_FORMAT).parse(attributeCommentDate.getValue());
- } catch (ParseException e) {
- // ignore
- }
- }
- }
- }
-
- if (completionDate == null) {
- // Use last modified date
- TaskAttribute attributeLastModified = taskData.getRoot().getMappedAttribute(
- TaskAttribute.DATE_MODIFICATION);
- if (attributeLastModified != null && attributeLastModified.getValue().length() > 0) {
- completionDate = taskData.getAttributeMapper().getDateValue(attributeLastModified);
- }
- }
-
- if (completionDate == null) {
- completionDate = new Date();
- }
-
- task.setCompletionDate(completionDate);
- } else {
- task.setCompletionDate(null);
- }
-
- // Bugzilla Specific Attributes
-
- // Product
- if (scheme.getProduct() != null) {
- task.setAttribute(TaskAttribute.PRODUCT, scheme.getProduct());
- }
-
- // Severity
- TaskAttribute attrSeverity = taskData.getRoot().getMappedAttribute(BugzillaAttribute.BUG_SEVERITY.getKey());
- if (attrSeverity != null && !attrSeverity.getValue().equals("")) { //$NON-NLS-1$
- task.setAttribute(BugzillaAttribute.BUG_SEVERITY.getKey(), attrSeverity.getValue());
- }
-
- }
-
- updateExtendedAttributes(task, taskData);
- }
-
- private void updateExtendedAttributes(ITask task, TaskData taskData) {
- // Set meta bugzilla task attribute values
- for (BugzillaAttribute bugzillaReportElement : BugzillaAttribute.EXTENDED_ATTRIBUTES) {
- TaskAttribute taskAttribute = taskData.getRoot().getAttribute(bugzillaReportElement.getKey());
- if (taskAttribute != null) {
- task.setAttribute(bugzillaReportElement.getKey(), taskAttribute.getValue());
- }
- }
- }
-
- @Override
- public void preSynchronization(ISynchronizationSession session, IProgressMonitor monitor) throws CoreException {
- TaskRepository repository = session.getTaskRepository();
- if (session.getTasks().isEmpty()) {
- return;
- }
-
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(Messages.BugzillaRepositoryConnector_checking_for_changed_tasks, session.getTasks()
- .size());
-
- if (repository.getSynchronizationTimeStamp() == null) {
- for (ITask task : session.getTasks()) {
- session.markStale(task);
- }
- return;
- }
-
- String dateString = repository.getSynchronizationTimeStamp();
- if (dateString == null) {
- dateString = ""; //$NON-NLS-1$
- }
-
- String urlQueryBase = repository.getRepositoryUrl() + CHANGED_BUGS_CGI_QUERY
- + URLEncoder.encode(dateString, repository.getCharacterEncoding()) + CHANGED_BUGS_CGI_ENDDATE;
-
- StringBuilder urlQueryString = new StringBuilder(Math.min(30 + 9 * session.getTasks().size(), 7009));
- urlQueryString.append(urlQueryBase + BUG_ID);
-
- Set<ITask> changedTasks = new HashSet<ITask>();
- Iterator<ITask> itr = session.getTasks().iterator();
- int queryCounter = 0;
- Set<ITask> checking = new HashSet<ITask>();
- while (itr.hasNext()) {
- ITask task = itr.next();
- checking.add(task);
- queryCounter++;
- urlQueryString.append(URLEncoder.encode(task.getTaskId() + ",", repository.getCharacterEncoding())); //$NON-NLS-1$
- if (urlQueryString.length() >= 7000) {
- queryForChanged(repository, changedTasks, urlQueryString.toString(), session,
- new SubProgressMonitor(monitor, queryCounter));
-
- queryCounter = 0;
- urlQueryString.setLength(0);
- urlQueryString.append(urlQueryBase + BUG_ID);
- }
-
- if (!itr.hasNext() && queryCounter != 0) {
- queryForChanged(repository, changedTasks, urlQueryString.toString(), session,
- new SubProgressMonitor(monitor, queryCounter));
- }
- }
-
- for (ITask task : session.getTasks()) {
- if (changedTasks.contains(task)) {
- session.markStale(task);
- }
- }
-
- } catch (UnsupportedEncodingException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Repository configured with unsupported encoding: " + repository.getCharacterEncoding() //$NON-NLS-1$
- + "\n\n Unable to determine changed tasks.", e)); //$NON-NLS-1$
- } finally {
- monitor.done();
- }
- }
-
- /**
- * TODO: clean up use of BugzillaTaskDataCollector
- */
- private void queryForChanged(final TaskRepository repository, Set<ITask> changedTasks, String urlQueryString,
- ISynchronizationSession context, IProgressMonitor monitor) throws UnsupportedEncodingException,
- CoreException {
-
- HashMap<String, ITask> taskById = new HashMap<String, ITask>();
- for (ITask task : context.getTasks()) {
- taskById.put(task.getTaskId(), task);
- }
- final Set<TaskData> changedTaskData = new HashSet<TaskData>();
- TaskDataCollector collector = new TaskDataCollector() {
-
- @Override
- public void accept(TaskData taskData) {
- changedTaskData.add(taskData);
- }
- };
-
- // TODO: Decouple from internals
- IRepositoryQuery query = new RepositoryQuery(repository.getConnectorKind(), ""); //$NON-NLS-1$
- query.setSummary(Messages.BugzillaRepositoryConnector_Query_for_changed_tasks);
- query.setUrl(urlQueryString);
- performQuery(repository, query, collector, context, monitor);
-
- for (TaskData data : changedTaskData) {
- ITask changedTask = taskById.get(data.getTaskId());
- if (changedTask != null) {
- changedTasks.add(changedTask);
- }
- }
-
- }
-
- @Override
- public boolean canCreateTaskFromKey(TaskRepository repository) {
- return true;
- }
-
- @Override
- public boolean canCreateNewTask(TaskRepository repository) {
- return true;
- }
-
- @Override
- public IStatus performQuery(TaskRepository repository, final IRepositoryQuery query,
- TaskDataCollector resultCollector, ISynchronizationSession event, IProgressMonitor monitor) {
-
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(Messages.BugzillaRepositoryConnector_running_query, IProgressMonitor.UNKNOWN);
- BugzillaClient client = getClientManager().getClient(repository, new SubProgressMonitor(monitor, 1));
- TaskAttributeMapper mapper = getTaskDataHandler().getAttributeMapper(repository);
- boolean hitsReceived = client.getSearchHits(query, resultCollector, mapper, monitor);
- if (!hitsReceived) {
- // XXX: HACK in case of ip change bugzilla can return 0 hits
- // due to invalid authorization token, forcing relogin fixes
- client.logout(monitor);
- client.getSearchHits(query, resultCollector, mapper, monitor);
- }
-
- return Status.OK_STATUS;
- } catch (UnrecognizedReponseException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, IStatus.INFO,
- Messages.BugzillaRepositoryConnector_Unrecognized_response_from_server, e);
- } catch (IOException e) {
- return new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN, IStatus.ERROR, MessageFormat.format(
- Messages.BugzillaRepositoryConnector_Check_repository_configuration, e.getMessage()), e);
- } catch (CoreException e) {
- return e.getStatus();
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public String getRepositoryUrlFromTaskUrl(String url) {
- if (url == null) {
- return null;
- }
- int index = url.indexOf(IBugzillaConstants.URL_GET_SHOW_BUG);
- return index == -1 ? null : url.substring(0, index);
- }
-
- @Override
- public String getTaskIdFromTaskUrl(String url) {
- if (url == null) {
- return null;
- }
- int anchorIndex = url.lastIndexOf("#"); //$NON-NLS-1$
- String bugUrl = url;
- if (anchorIndex != -1) {
- bugUrl = url.substring(0, anchorIndex);
- }
-
- int index = bugUrl.indexOf(IBugzillaConstants.URL_GET_SHOW_BUG);
- return index == -1 ? null : bugUrl.substring(index + IBugzillaConstants.URL_GET_SHOW_BUG.length());
- }
-
- @Override
- public String getTaskUrl(String repositoryUrl, String taskId) {
- try {
- return BugzillaClient.getBugUrlWithoutLogin(repositoryUrl, taskId);
- } catch (Exception e) {
- StatusHandler.log(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Error constructing task url for " + repositoryUrl + " id:" + taskId, e)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- return null;
- }
-
- @Override
- public String getTaskIdPrefix() {
- return "bug"; //$NON-NLS-1$
- }
-
- public BugzillaClientManager getClientManager() {
- if (clientManager == null) {
- clientManager = new BugzillaClientManager();
- // TODO: Move this initialization elsewhere
- BugzillaCorePlugin.setConnector(this);
- enSetting = new BugzillaLanguageSettings(IBugzillaConstants.DEFAULT_LANG);
- enSetting.addLanguageAttribute("error_login", "Login"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_login", "log in"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_login", "check e-mail"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_login", "Invalid Username Or Password"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_collision", "Mid-air collision!"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_comment_required", "Comment Required"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("error_logged_out", "logged out"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bad_login", "Login"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bad_login", "log in"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bad_login", "check e-mail"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bad_login", "Invalid Username Or Password"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bad_login", "error"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("processed", "processed"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("changes_submitted", "Changes submitted"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("changes_submitted", "added to Bug"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bug", "Bug"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("bug", "Issue"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("submitted", "Submitted"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("submitted", "posted"); //$NON-NLS-1$ //$NON-NLS-2$
- enSetting.addLanguageAttribute("suspicious_action", "Suspicious action"); //$NON-NLS-1$ //$NON-NLS-2$
- languages.add(enSetting);
-
- }
- return clientManager;
- }
-
- @Override
- public void updateRepositoryConfiguration(TaskRepository repository, IProgressMonitor monitor) throws CoreException {
- if (repository != null) {
- BugzillaCorePlugin.getRepositoryConfiguration(repository, true, monitor);
- }
- }
-
- @Override
- public boolean isRepositoryConfigurationStale(TaskRepository repository, IProgressMonitor monitor)
- throws CoreException {
- if (super.isRepositoryConfigurationStale(repository, monitor)) {
- boolean result = true;
- BugzillaClient client = getClientManager().getClient(repository, monitor);
- if (client != null) {
- String timestamp = client.getConfigurationTimestamp(monitor);
- if (timestamp != null) {
- String oldTimestamp = repository.getProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP);
- if (oldTimestamp != null) {
- result = !timestamp.equals(oldTimestamp);
- }
- repository.setProperty(IBugzillaConstants.PROPERTY_CONFIGTIMESTAMP, timestamp);
- }
- }
- return result;
- }
- return false;
- }
-
- public static void addLanguageSetting(BugzillaLanguageSettings language) {
- if (!languages.contains(language)) {
- BugzillaRepositoryConnector.languages.add(language);
- }
- }
-
- public static Set<BugzillaLanguageSettings> getLanguageSettings() {
- return languages;
- }
-
- /** returns default language if language not found */
- public static BugzillaLanguageSettings getLanguageSetting(String label) {
- for (BugzillaLanguageSettings language : getLanguageSettings()) {
- if (language.getLanguageName().equals(label)) {
- return language;
- }
- }
- return enSetting;
- }
-
- @Override
- public void postSynchronization(ISynchronizationSession event, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask("", 1); //$NON-NLS-1$
- if (event.isFullSynchronization() && event.getStatus() == null) {
- event.getTaskRepository().setSynchronizationTimeStamp(getSynchronizationTimestamp(event));
- }
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public TaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
- return taskDataHandler.getTaskData(repository, taskId, monitor);
- }
-
- @Override
- public AbstractTaskDataHandler getTaskDataHandler() {
- return taskDataHandler;
- }
-
- @Override
- public boolean hasTaskChanged(TaskRepository taskRepository, ITask task, TaskData taskData) {
- if (taskData.isPartial() && task.getCreationDate() != null) {
- return false;
- }
-
- // Security token
- // Updated on the task upon each open (synch) to keep the most current token available for submission - bug#263318
- TaskAttribute attrSecurityToken = taskData.getRoot().getMappedAttribute(BugzillaAttribute.TOKEN.getKey());
- if (attrSecurityToken != null && !attrSecurityToken.getValue().equals("")) { //$NON-NLS-1$
- task.setAttribute(BugzillaAttribute.TOKEN.getKey(), attrSecurityToken.getValue());
- }
-
- String lastKnownMod = task.getAttribute(BugzillaAttribute.DELTA_TS.getKey());
- if (lastKnownMod != null) {
-
- TaskAttribute attrModification = taskData.getRoot().getMappedAttribute(TaskAttribute.DATE_MODIFICATION);
- if (attrModification != null && attrModification.getValue() != null
- && attrModification.getValue().length() > 0) {
-
- boolean cachedHasTZ = hasTimzone(lastKnownMod);
- boolean repoHasTZ = hasTimzone(attrModification.getValue());
- if (!cachedHasTZ && !repoHasTZ) { // State 1
- return !lastKnownMod.equals(attrModification.getValue());
- }
-
- BugzillaAttributeMapper mapper = (BugzillaAttributeMapper) taskData.getAttributeMapper();
- Date oldModDate = mapper.getDate(BugzillaAttribute.DELTA_TS.getKey(), lastKnownMod);
- Date newModDate = mapper.getDateValue(attrModification);
-
- // If either of the dates can't be parsed, fall back to string comparison
- if (oldModDate == null) {
- ((AbstractTask) task).setStatus(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to parse cached task modification timestamp " + lastKnownMod)); //$NON-NLS-1$
- return !lastKnownMod.equals(attrModification.getValue());
- } else if (newModDate == null) {
- ((AbstractTask) task).setStatus(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to parse incoming task modification timestamp " + attrModification.getValue())); //$NON-NLS-1$
- return !lastKnownMod.equals(attrModification.getValue());
- }
-
- if ((cachedHasTZ && !repoHasTZ) || (!cachedHasTZ && repoHasTZ)) { // State 2 (unlikely) || Sate 3
- long delta = Math.abs(newModDate.getTime() - oldModDate.getTime());
- if (delta == 0) {
- return false;
- } else if (delta > 0 && delta % HOUR == 0 && delta < 24 * HOUR) {
- // If same time but in different time zones, ignore/migrate
- return false;
- }
- return true;
- } else if (cachedHasTZ && repoHasTZ) { //State 4 (of 4)
- // Date Compare
- return oldModDate.compareTo(newModDate) != 0;
- }
- }
- }
- return true;
- }
-
- private boolean hasTimzone(String dateString) {
- if (dateString == null || dateString.length() == 0) {
- return false;
- }
- String[] parts = dateString.split(" "); //$NON-NLS-1$
- boolean hasTimeZone = (parts != null && parts.length == 3);
- return hasTimeZone;
- }
-
- @Override
- public Collection<TaskRelation> getTaskRelations(TaskData taskData) {
- List<TaskRelation> relations = new ArrayList<TaskRelation>();
- TaskAttribute attribute = taskData.getRoot().getAttribute(BugzillaAttribute.DEPENDSON.getKey());
- if (attribute != null && attribute.getValue().length() > 0) {
- for (String taskId : attribute.getValue().split(",")) { //$NON-NLS-1$
- relations.add(TaskRelation.subtask(taskId.trim()));
- }
- }
- return relations;
- }
-
- private String getSynchronizationTimestamp(ISynchronizationSession event) {
- Date mostRecent = new Date(0);
- String mostRecentTimeStamp = event.getTaskRepository().getSynchronizationTimeStamp();
- for (ITask task : event.getChangedTasks()) {
- Date taskModifiedDate = task.getModificationDate();
- if (taskModifiedDate != null && taskModifiedDate.after(mostRecent)) {
- mostRecent = taskModifiedDate;
- mostRecentTimeStamp = task.getAttribute(BugzillaAttribute.DELTA_TS.getKey());
- }
- }
- return mostRecentTimeStamp;
- }
-
- @Override
- public boolean hasRepositoryDueDate(TaskRepository taskRepository, ITask task, TaskData taskData) {
- return taskData.getRoot().getAttribute(BugzillaAttribute.ESTIMATED_TIME.getKey()) != null;
- }
-
- @Override
- public TaskMapper getTaskMapping(final TaskData taskData) {
- return new TaskMapper(taskData) {
- @Override
- public String getTaskKey() {
- TaskAttribute attribute = getTaskData().getRoot().getAttribute(BugzillaAttribute.BUG_ID.getKey());
- if (attribute != null) {
- return attribute.getValue();
- }
- return super.getTaskKey();
- }
-
- @Override
- public String getTaskKind() {
- return taskData.getConnectorKind();
- }
-
- @Override
- public String getTaskUrl() {
- return taskData.getRepositoryUrl();
- }
- };
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryResponse.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryResponse.java
deleted file mode 100644
index 583626b80..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaRepositoryResponse.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Frank Becker 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:
- * Frank Becker - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.RepositoryResponse;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaRepositoryResponse extends RepositoryResponse {
-
- private Map<String, List<String>> responseData = new LinkedHashMap<String, List<String>>();
-
- public BugzillaRepositoryResponse(ResponseKind reposonseKind, String taskId) {
- super(reposonseKind, taskId);
- }
-
- public BugzillaRepositoryResponse() {
- // ignore
- }
-
- public Map<String, List<String>> getResponseData() {
- return responseData;
- }
-
- public void setResponseData(Map<String, List<String>> responseData) {
- this.responseData = responseData;
- }
-
- public void addResponseData(String name, String response) {
- List<String> responseList = responseData.get(name);
- if (responseList == null) {
- responseList = new LinkedList<String>();
- responseData.put(name, responseList);
- }
- responseList.add(response);
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
deleted file mode 100644
index 562b2cdba..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaStatus.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import org.eclipse.core.runtime.Status;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @author Rob Elves
- */
-public class BugzillaStatus extends Status {
-
- private final String errorMessage;
-
- private String repositoryUrl = ""; //$NON-NLS-1$
-
- public BugzillaStatus(int severity, String pluginId, int code) {
- super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
- this.errorMessage = null;
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String errorMessage) {
- super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
- this.errorMessage = errorMessage;
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, Throwable e) {
- super(severity, pluginId, code, "MylynStatus", e); //$NON-NLS-1$
- this.repositoryUrl = repositoryUrl;
- this.errorMessage = e.getMessage();
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, String errorMessage) {
- super(severity, pluginId, code, "MylynStatus", null); //$NON-NLS-1$
- this.errorMessage = errorMessage;
- this.repositoryUrl = repositoryUrl;
- }
-
- public BugzillaStatus(int severity, String pluginId, int code, String repositoryUrl, String errorMessage,
- Throwable e) {
- super(severity, pluginId, code, "MylynStatus", e); //$NON-NLS-1$
- this.errorMessage = errorMessage;
- this.repositoryUrl = repositoryUrl;
- }
-
- /**
- * Returns the message that is relevant to the code of this status.
- */
- @Override
- public String getMessage() {
-
- switch (getCode()) {
- case RepositoryStatus.ERROR_REPOSITORY_LOGIN:
- return NLS.bind(Messages.BugzillaStatus_repositoryLoginFailure, this.getRepositoryUrl(), this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY_NOT_FOUND:
- return NLS.bind(Messages.BugzillaStatus_repositoryNotFound, this.errorMessage);
- case RepositoryStatus.ERROR_REPOSITORY:
- return NLS.bind(Messages.BugzillaStatus_errorRepository, this.getRepositoryUrl(), this.errorMessage);
- case RepositoryStatus.ERROR_IO:
- String string1 = "Unknown IO error occurred"; //$NON-NLS-1$
- String string2 = "No message provided"; //$NON-NLS-1$
- if (getException() != null) {
- string1 = getException().getClass().getSimpleName();
- string2 = getException().getMessage();
- }
- Object[] strings = { getRepositoryUrl(), string1, string2 };
- return NLS.bind(Messages.BugzillaStatus_errorIo, strings);
- case RepositoryStatus.ERROR_INTERNAL:
- return NLS.bind(Messages.BugzillaStatus_errorInternal, this.errorMessage);
- case RepositoryStatus.OPERATION_CANCELLED:
- return NLS.bind(Messages.BugzillaStatus_operationCancelled, this.errorMessage);
- case RepositoryStatus.REPOSITORY_COLLISION:
- return NLS.bind(Messages.BugzillaStatus_repositoryCollision, this.errorMessage);
- case RepositoryStatus.REPOSITORY_COMMENT_REQUIRED:
- if (errorMessage == null) {
- return Messages.BugzillaStatus_repositoryCommentRequired;
- } else {
- return errorMessage;
- }
- }
- if (errorMessage != null) {
- return errorMessage;
- } else if (getException() != null) {
- String message = getException().getMessage();
- if (message != null) {
- return message;
- } else {
- return getException().toString();
- }
- }
- return "Unknown"; //$NON-NLS-1$
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public void setRepositoryUrl(String repositoryUrl) {
- this.repositoryUrl = repositoryUrl;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
deleted file mode 100644
index 8c18538b2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskAttachmentHandler.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-
-/**
- * @author Rob Elves
- * @since 3.0
- */
-public class BugzillaTaskAttachmentHandler extends AbstractTaskAttachmentHandler {
-
- private final BugzillaRepositoryConnector connector;
-
- public BugzillaTaskAttachmentHandler(BugzillaRepositoryConnector connector) {
- this.connector = connector;
- }
-
- @Override
- public boolean canGetContent(TaskRepository repository, ITask task) {
- // ignore
- return true;
- }
-
- @Override
- public boolean canPostContent(TaskRepository repository, ITask task) {
- // ignore
- return true;
- }
-
- @Override
- public InputStream getContent(TaskRepository repository, ITask task, TaskAttribute attachmentAttribute,
- IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(Messages.BugzillaTaskAttachmentHandler_Getting_attachment, IProgressMonitor.UNKNOWN);
- TaskAttachmentMapper attachment = TaskAttachmentMapper.createFrom(attachmentAttribute);
- ByteArrayOutputStream out = new ByteArrayOutputStream();
- downloadAttachment(repository, task, attachment.getAttachmentId(), out, monitor);
- return new ByteArrayInputStream(out.toByteArray());
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public void postContent(TaskRepository repository, ITask task, AbstractTaskAttachmentSource source, String comment,
- TaskAttribute attachmentAttribute, IProgressMonitor monitor) throws CoreException {
- try {
- monitor.beginTask(Messages.BugzillaTaskAttachmentHandler_Sending_attachment, IProgressMonitor.UNKNOWN);
- BugzillaClient client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
-
- client.postAttachment(task.getTaskId(), comment, source, attachmentAttribute, monitor);
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- Messages.BugzillaTaskAttachmentHandler_unable_to_submit_attachment, e));
- } finally {
- monitor.done();
- }
-
- }
-
- private void downloadAttachment(TaskRepository repository, ITask task, String attachmentId, OutputStream out,
- IProgressMonitor monitor) throws CoreException {
- BugzillaClient client;
- try {
- client = connector.getClientManager().getClient(repository,
- new SubProgressMonitor(monitor, IProgressMonitor.UNKNOWN));
- client.getAttachmentData(attachmentId, out, monitor);
- } catch (IOException e) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Unable to retrieve attachment", e)); //$NON-NLS-1$
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
deleted file mode 100644
index 2a55f1714..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaTaskDataHandler.java
+++ /dev/null
@@ -1,704 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.SubProgressMonitor;
-import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
-import org.eclipse.mylyn.commons.net.AuthenticationType;
-import org.eclipse.mylyn.commons.net.Policy;
-import org.eclipse.mylyn.tasks.core.ITask;
-import org.eclipse.mylyn.tasks.core.ITaskMapping;
-import org.eclipse.mylyn.tasks.core.RepositoryResponse;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.TaskRepository;
-import org.eclipse.mylyn.tasks.core.data.AbstractTaskDataHandler;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.eclipse.mylyn.tasks.core.data.TaskMapper;
-
-/**
- * @author Mik Kersten
- * @author Rob Elves
- */
-public class BugzillaTaskDataHandler extends AbstractTaskDataHandler {
-
- private enum TaskDataVersion {
-
- VERSION_0(0f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- // ignore
- }
- },
-
- VERSION_1_0(1.0f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- // 1: the value was stored in the attribute rather than the key
- for (TaskAttribute attribute : new ArrayList<TaskAttribute>(data.getRoot().getAttributes().values())) {
- if (attribute.getId().equals(BugzillaAttribute.DESC.getKey())) {
- TaskAttribute attrLongDesc = createAttribute(data, BugzillaAttribute.LONG_DESC);
- attrLongDesc.setValue(attribute.getValue());
- data.getRoot().removeAttribute(BugzillaAttribute.DESC.getKey());
- }
- }
- // Old actions not saved so recreate them upon migration
- // delete legacy operations:
- Set<TaskAttribute> operationsToRemove = new HashSet<TaskAttribute>();
- for (TaskAttribute attribute : data.getAttributeMapper().getAttributesByType(data,
- TaskAttribute.TYPE_OPERATION)) {
- operationsToRemove.add(attribute);
- }
- for (TaskAttribute taskAttribute : operationsToRemove) {
- data.getRoot().removeAttribute(taskAttribute.getId());
- }
- RepositoryConfiguration configuration = BugzillaCorePlugin.getRepositoryConfiguration(repository.getRepositoryUrl());
- if (configuration != null) {
- configuration.addValidOperations(data);
- }
- }
- },
- VERSION_2_0(2.0f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- updateAttribute(data, BugzillaAttribute.LONG_DESC);
- }
- },
- VERSION_3_0(3.0f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- updateAttribute(data, BugzillaAttribute.NEW_COMMENT);
- }
- },
- VERSION_4_0(4.0f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- updateAttribute(data, BugzillaAttribute.DEADLINE);
- updateAttribute(data, BugzillaAttribute.ACTUAL_TIME);
- }
- },
- VERSION_4_1(4.1f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- updateAttribute(data, BugzillaAttribute.VOTES);
- TaskAttribute attrDeadline = data.getRoot().getMappedAttribute(BugzillaAttribute.VOTES.getKey());
- if (attrDeadline != null) {
- attrDeadline.getMetaData().setType(BugzillaAttribute.VOTES.getType());
- }
- }
- },
- VERSION_4_2(4.2f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- updateAttribute(data, BugzillaAttribute.CC);
- updateAttribute(data, BugzillaAttribute.DEPENDSON);
- updateAttribute(data, BugzillaAttribute.BLOCKED);
- updateAttribute(data, BugzillaAttribute.BUG_FILE_LOC);
- updateAttribute(data, BugzillaAttribute.KEYWORDS);
- updateAttribute(data, BugzillaAttribute.STATUS_WHITEBOARD);
- updateAttribute(data, BugzillaAttribute.QA_CONTACT);
- updateAttribute(data, BugzillaAttribute.NEWCC);
- }
- },
- VERSION_4_3(4.3f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- // migrate custom attributes
- for (TaskAttribute attribute : data.getRoot().getAttributes().values()) {
- if (attribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
- attribute.getMetaData().setReadOnly(false);
- if (attribute.getOptions().size() > 0) {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- } else {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- }
- }
- },
- VERSION_4_4(4.4f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- // summary didn't have spell checking, update to short rich text
- updateAttribute(data, BugzillaAttribute.SHORT_DESC);
- }
- },
- VERSION_4_5(4.5f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- // migrate custom attributes
- RepositoryConfiguration configuration = BugzillaCorePlugin.getRepositoryConfiguration(repository.getRepositoryUrl());
-
- if (configuration == null) {
- return;
- }
-
- for (TaskAttribute attribute : data.getRoot().getAttributes().values()) {
- if (attribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
-
- BugzillaCustomField customField = null;
- String actName = attribute.getId();
- for (BugzillaCustomField bugzillaCustomField : configuration.getCustomFields()) {
- if (actName.equals(bugzillaCustomField.getName())) {
- customField = bugzillaCustomField;
- break;
- }
- }
- if (customField != null) {
- String desc = customField.getDescription();
- attribute.getMetaData().defaults().setLabel(desc).setReadOnly(false);
- attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- switch (customField.getFieldType()) {
- case FreeText:
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- break;
- case DropDown:
- attribute.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- break;
- case MultipleSelection:
- attribute.getMetaData().setType(TaskAttribute.TYPE_MULTI_SELECT);
- break;
- case LargeText:
- attribute.getMetaData().setType(TaskAttribute.TYPE_LONG_TEXT);
- break;
- case DateTime:
- attribute.getMetaData().setType(TaskAttribute.TYPE_DATETIME);
- break;
-
- default:
- List<String> options = customField.getOptions();
- if (options.size() > 0) {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- } else {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- attribute.getMetaData().setReadOnly(false);
- }
- }
- }
- }
- },
- VERSION_CURRENT(4.6f) {
- @Override
- void migrate(TaskRepository repository, TaskData data) {
- data.setVersion(TaskDataVersion.VERSION_CURRENT.toString());
- }
- };
-
- private float versionNumber = 0;
-
- TaskDataVersion(float verNum) {
- versionNumber = verNum;
- }
-
- public float getVersionNum() {
- return versionNumber;
- }
-
- abstract void migrate(TaskRepository repository, TaskData data);
-
- @Override
- public String toString() {
- return "" + getVersionNum(); //$NON-NLS-1$
- }
-
- private static void updateAttribute(TaskData data, BugzillaAttribute bugAttribute) {
- TaskAttribute attribute = data.getRoot().getMappedAttribute(bugAttribute.getKey());
- if (attribute != null) {
- attribute.getMetaData().setType(bugAttribute.getType());
- attribute.getMetaData().setReadOnly(bugAttribute.isReadOnly());
- attribute.getMetaData().setKind(bugAttribute.getKind());
- }
- }
- }
-
- private final BugzillaRepositoryConnector connector;
-
- public BugzillaTaskDataHandler(BugzillaRepositoryConnector connector) {
- this.connector = connector;
- }
-
- public TaskData getTaskData(TaskRepository repository, String taskId, IProgressMonitor monitor)
- throws CoreException {
-
- Set<String> taskIds = new HashSet<String>();
- taskIds.add(taskId);
- final TaskData[] retrievedData = new TaskData[1];
- TaskDataCollector collector = new TaskDataCollector() {
-
- @Override
- public void accept(TaskData taskData) {
- retrievedData[0] = taskData;
- }
- };
- getMultiTaskData(repository, taskIds, collector, monitor);
-
- if (retrievedData[0] == null) {
- throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- "Task data could not be retrieved. Please re-synchronize task")); //$NON-NLS-1$
- }
- return retrievedData[0];
-
-// monitor = Policy.monitorFor(monitor);
-// try {
-// monitor.beginTask("Receiving task", IProgressMonitor.UNKNOWN);
-// BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
-// int bugId = BugzillaRepositoryConnector.getBugId(taskId);
-// TaskData taskData = client.getTaskData(bugId, getAttributeMapper(repository), monitor);
-// if (taskData == null) {
-// throw new CoreException(new Status(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
-// "Task data could not be retrieved. Please re-synchronize task"));
-// }
-// return taskData;
-// } catch (IOException e) {
-// throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
-// RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
-// } finally {
-// monitor.done();
-// }
- }
-
- @Override
- public void getMultiTaskData(final TaskRepository repository, Set<String> taskIds,
- final TaskDataCollector collector, IProgressMonitor monitor) throws CoreException {
-
- monitor = Policy.monitorFor(monitor);
-
- try {
- monitor.beginTask(Messages.BugzillaTaskDataHandler_Receiving_tasks, taskIds.size());
- BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
- final CoreException[] collectionException = new CoreException[1];
-
- class CollectorWrapper extends TaskDataCollector {
-
- private final IProgressMonitor monitor2;
-
- private final TaskDataCollector collector;
-
- public CollectorWrapper(TaskDataCollector collector, IProgressMonitor monitor2) {
- this.collector = collector;
- this.monitor2 = monitor2;
- }
-
- @Override
- public void accept(TaskData taskData) {
- try {
- initializeTaskData(repository, taskData, null, new SubProgressMonitor(monitor2, 1));
- } catch (CoreException e) {
- if (collectionException[0] == null) {
- collectionException[0] = e;
- }
- }
- collector.accept(taskData);
- monitor2.worked(1);
- }
- }
-
- TaskDataCollector collector2 = new CollectorWrapper(collector, monitor);
-
- client.getTaskData(taskIds, collector2, getAttributeMapper(repository), monitor);
-
- if (collectionException[0] != null) {
- throw collectionException[0];
- }
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public void migrateTaskData(TaskRepository taskRepository, TaskData taskData) {
-
- float bugzillaTaskDataVersion = 0;
- {
- String taskDataVersion = taskData.getVersion();
- if (taskDataVersion != null) {
- try {
- bugzillaTaskDataVersion = Float.parseFloat(taskDataVersion);
- } catch (NumberFormatException e) {
- bugzillaTaskDataVersion = 0;
- }
- }
- }
-
- for (TaskDataVersion version : TaskDataVersion.values()) {
- if (bugzillaTaskDataVersion <= version.getVersionNum()) {
- version.migrate(taskRepository, taskData);
- }
- }
- }
-
- @Override
- public RepositoryResponse postTaskData(TaskRepository repository, TaskData taskData,
- Set<TaskAttribute> changedAttributes, IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(Messages.BugzillaTaskDataHandler_Submitting_task, IProgressMonitor.UNKNOWN);
- BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
- try {
- return client.postTaskData(taskData, monitor);
- } catch (CoreException e) {
- // TODO: Move retry handling into client
- if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- return client.postTaskData(taskData, monitor);
- } else if (e.getStatus().getCode() == IBugzillaConstants.REPOSITORY_STATUS_SUSPICIOUS_ACTION) {
- taskData.getRoot().removeAttribute(BugzillaAttribute.TOKEN.getKey());
- return client.postTaskData(taskData, monitor);
- } else {
- throw e;
- }
- }
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- } finally {
- monitor.done();
- }
- }
-
- @Override
- public boolean initializeTaskData(TaskRepository repository, TaskData taskData, ITaskMapping initializationData,
- IProgressMonitor monitor) throws CoreException {
-
- // Note: setting current version to latest assumes the data arriving here is either for a new task or is
- // fresh from the repository (not locally stored data that may not have been migrated).
- taskData.setVersion(TaskDataVersion.VERSION_CURRENT.toString());
-
- RepositoryConfiguration repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository,
- false, monitor);
-
- if (repositoryConfiguration == null) {
- return false;
- }
-
- if (taskData.isNew()) {
- String product = null;
- String component = null;
- if (initializationData == null || initializationData.getProduct() == null) {
- if (repositoryConfiguration.getProducts().size() > 0) {
- product = repositoryConfiguration.getProducts().get(0);
- }
- } else {
- product = initializationData.getProduct();
- }
-
- if (product == null) {
- return false;
- }
-
- if (initializationData != null && initializationData.getComponent() != null
- && initializationData.getComponent().length() > 0) {
- component = initializationData.getComponent();
- }
-
- if (component == null && repositoryConfiguration.getComponents(product).size() > 0) {
- component = repositoryConfiguration.getComponents(product).get(0);
- }
-
- initializeNewTaskDataAttributes(repositoryConfiguration, taskData, product, component, monitor);
- BugzillaCorePlugin.getDefault().setPlatformDefaultsOrGuess(repository, taskData);
- return true;
-
- } else {
- repositoryConfiguration.configureTaskData(taskData);
- }
- return true;
- }
-
- /**
- * Only new, unsubmitted task data or freshly received task data from the repository can be passed in here.
- *
- * @param component
- */
- private boolean initializeNewTaskDataAttributes(RepositoryConfiguration repositoryConfiguration, TaskData taskData,
- String product, String component, IProgressMonitor monitor) {
-
- TaskAttribute productAttribute = createAttribute(taskData, BugzillaAttribute.PRODUCT);
- productAttribute.setValue(product);
-
- List<String> optionValues = repositoryConfiguration.getProducts();
- Collections.sort(optionValues);
- for (String optionValue : optionValues) {
- productAttribute.putOption(optionValue, optionValue);
- }
-
- TaskAttribute attributeStatus = createAttribute(taskData, BugzillaAttribute.BUG_STATUS);
- optionValues = repositoryConfiguration.getStatusValues();
- for (String option : optionValues) {
- attributeStatus.putOption(option, option);
- }
-
- attributeStatus.setValue(IBugzillaConstants.VALUE_STATUS_NEW);
-
- createAttribute(taskData, BugzillaAttribute.SHORT_DESC);
-
- TaskAttribute attributeVersion = createAttribute(taskData, BugzillaAttribute.VERSION);
- optionValues = repositoryConfiguration.getVersions(productAttribute.getValue());
- Collections.sort(optionValues);
- for (String option : optionValues) {
- attributeVersion.putOption(option, option);
- }
- if (optionValues.size() > 0) {
- attributeVersion.setValue(optionValues.get(optionValues.size() - 1));
- }
-
- TaskAttribute attributeComponent = createAttribute(taskData, BugzillaAttribute.COMPONENT);
- optionValues = repositoryConfiguration.getComponents(productAttribute.getValue());
- Collections.sort(optionValues);
- for (String option : optionValues) {
- attributeComponent.putOption(option, option);
- }
- if (optionValues.size() == 1) {
- attributeComponent.setValue(optionValues.get(0));
- }
- if (component != null && optionValues.contains(component)) {
- attributeComponent.setValue(component);
- }
-
- optionValues = repositoryConfiguration.getTargetMilestones(productAttribute.getValue());
- if (optionValues.size() > 0) {
- TaskAttribute attributeTargetMilestone = createAttribute(taskData, BugzillaAttribute.TARGET_MILESTONE);
- Collections.sort(optionValues);
- for (String option : optionValues) {
- attributeTargetMilestone.putOption(option, option);
- }
- attributeTargetMilestone.setValue(optionValues.get(0));
- }
-
- TaskAttribute attributePlatform = createAttribute(taskData, BugzillaAttribute.REP_PLATFORM);
- optionValues = repositoryConfiguration.getPlatforms();
- for (String option : optionValues) {
- attributePlatform.putOption(option, option);
- }
- if (optionValues.size() > 0) {
- // bug 159397 choose first platform: All
- attributePlatform.setValue(optionValues.get(0));
- }
-
- TaskAttribute attributeOPSYS = createAttribute(taskData, BugzillaAttribute.OP_SYS);
- optionValues = repositoryConfiguration.getOSs();
- for (String option : optionValues) {
- attributeOPSYS.putOption(option, option);
- }
- if (optionValues.size() > 0) {
- // bug 159397 change to choose first op_sys All
- attributeOPSYS.setValue(optionValues.get(0));
- }
-
- TaskAttribute attributePriority = createAttribute(taskData, BugzillaAttribute.PRIORITY);
- optionValues = repositoryConfiguration.getPriorities();
- for (String option : optionValues) {
- attributePriority.putOption(option, option);
- }
- if (optionValues.size() > 0) {
- // choose middle priority
- attributePriority.setValue(optionValues.get((optionValues.size() / 2)));
- }
-
- TaskAttribute attributeSeverity = createAttribute(taskData, BugzillaAttribute.BUG_SEVERITY);
- optionValues = repositoryConfiguration.getSeverities();
- for (String option : optionValues) {
- attributeSeverity.putOption(option, option);
- }
- if (optionValues.size() > 0) {
- // choose middle severity
- attributeSeverity.setValue(optionValues.get((optionValues.size() / 2)));
- }
-
- TaskAttribute attributeAssignedTo = createAttribute(taskData, BugzillaAttribute.ASSIGNED_TO);
- attributeAssignedTo.setValue(""); //$NON-NLS-1$
-
- TaskAttribute attributeQAContact = createAttribute(taskData, BugzillaAttribute.QA_CONTACT);
- attributeQAContact.setValue(""); //$NON-NLS-1$
-
- TaskAttribute attributeBugFileLoc = createAttribute(taskData, BugzillaAttribute.BUG_FILE_LOC);
- attributeBugFileLoc.setValue("http://"); //$NON-NLS-1$
-
- createAttribute(taskData, BugzillaAttribute.DEPENDSON);
- createAttribute(taskData, BugzillaAttribute.BLOCKED);
- createAttribute(taskData, BugzillaAttribute.NEWCC);
- createAttribute(taskData, BugzillaAttribute.LONG_DESC);
-
- List<String> keywords = repositoryConfiguration.getKeywords();
- if (keywords.size() > 0) {
- createAttribute(taskData, BugzillaAttribute.KEYWORDS);
- }
-
- TaskAttribute attrDescription = taskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION);
- if (attrDescription != null) {
- attrDescription.getMetaData().setReadOnly(false);
- }
- TaskAttribute attrOwner = taskData.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- if (attrOwner != null) {
- attrOwner.getMetaData().setReadOnly(false);
- }
- TaskAttribute attrAddSelfToCc = taskData.getRoot().getMappedAttribute(TaskAttribute.ADD_SELF_CC);
- if (attrAddSelfToCc != null) {
- attrAddSelfToCc.getMetaData().setKind(null);
- }
-
- List<BugzillaCustomField> customFields = new ArrayList<BugzillaCustomField>();
- if (repositoryConfiguration != null) {
- customFields = repositoryConfiguration.getCustomFields();
- }
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- if (bugzillaCustomField.isEnterBug()) {
- TaskAttribute attribute = taskData.getRoot().createAttribute(bugzillaCustomField.getName());
- if (attribute != null) {
- attribute.getMetaData().defaults().setLabel(bugzillaCustomField.getDescription());
- attribute.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
-
- List<String> options = bugzillaCustomField.getOptions();
-
- switch (bugzillaCustomField.getFieldType()) {
- case FreeText:
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- break;
- case DropDown:
- attribute.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- break;
- case MultipleSelection:
- attribute.getMetaData().setType(TaskAttribute.TYPE_MULTI_SELECT);
- break;
- case LargeText:
- attribute.getMetaData().setType(TaskAttribute.TYPE_LONG_TEXT);
- break;
- case DateTime:
- attribute.getMetaData().setType(TaskAttribute.TYPE_DATETIME);
- break;
-
- default:
- if (options.size() > 0) {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- } else {
- attribute.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- attribute.getMetaData().setReadOnly(false);
-
- for (String option : options) {
- attribute.putOption(option, option);
- }
-
- if (bugzillaCustomField.getFieldType() == BugzillaCustomField.FieldType.DropDown
- && options.size() > 0) {
- attribute.setValue(options.get(0));
- }
-
- }
- }
- }
-
- return true;
- }
-
- @Override
- public boolean canGetMultiTaskData(TaskRepository taskRepository) {
- return true;
- }
-
- @Override
- public boolean canInitializeSubTaskData(TaskRepository taskRepository, ITask task) {
- return true;
- }
-
- @Override
- public boolean initializeSubTaskData(TaskRepository repository, TaskData subTaskData, TaskData parentTaskData,
- IProgressMonitor monitor) throws CoreException {
- TaskMapper mapper = new TaskMapper(parentTaskData);
- initializeTaskData(repository, subTaskData, mapper, monitor);
- new TaskMapper(subTaskData).merge(mapper);
- subTaskData.getRoot().getMappedAttribute(BugzillaAttribute.DEPENDSON.getKey()).setValue(""); //$NON-NLS-1$
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.DESCRIPTION).setValue(""); //$NON-NLS-1$
- subTaskData.getRoot().getMappedAttribute(TaskAttribute.SUMMARY).setValue(""); //$NON-NLS-1$
- TaskAttribute keywords = subTaskData.getRoot().getMappedAttribute(TaskAttribute.KEYWORDS);
- if (keywords != null) {
- // only if the repository has keywords this attribut exists
- keywords.setValue(""); //$NON-NLS-1$
- }
- subTaskData.getRoot().getAttribute(BugzillaAttribute.BLOCKED.getKey()).setValue(parentTaskData.getTaskId());
- TaskAttribute parentAttributeAssigned = parentTaskData.getRoot()
- .getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- subTaskData.getRoot().getAttribute(BugzillaAttribute.ASSIGNED_TO.getKey()).setValue(
- parentAttributeAssigned.getValue());
- return true;
- }
-
- @Override
- public TaskAttributeMapper getAttributeMapper(TaskRepository taskRepository) {
- return new BugzillaAttributeMapper(taskRepository);
- }
-
- public static TaskAttribute createAttribute(TaskData data, BugzillaAttribute key) {
- return createAttribute(data.getRoot(), key);
- }
-
- public static TaskAttribute createAttribute(TaskAttribute parent, BugzillaAttribute key) {
- TaskAttribute attribute = parent.createAttribute(key.getKey());
- attribute.getMetaData()
- .defaults()
- .setReadOnly(key.isReadOnly())
- .setKind(key.getKind())
- .setLabel(key.toString())
- .setType(key.getType());
- return attribute;
- }
-
- public void postUpdateAttachment(TaskRepository repository, TaskAttribute taskAttribute, String action,
- IProgressMonitor monitor) throws CoreException {
- monitor = Policy.monitorFor(monitor);
- try {
- monitor.beginTask(Messages.BugzillaTaskDataHandler_updating_attachment, IProgressMonitor.UNKNOWN);
- BugzillaClient client = connector.getClientManager().getClient(repository, monitor);
- try {
- client.postUpdateAttachment(taskAttribute, action, monitor);
- } catch (CoreException e) {
- // TODO: Move retry handling into client
- if (e.getStatus().getCode() == RepositoryStatus.ERROR_REPOSITORY_LOGIN) {
- AuthenticationCredentials creds = repository.getCredentials(AuthenticationType.REPOSITORY);
- if (creds != null && creds.getUserName() != null && creds.getUserName().length() > 0) {
- client.postUpdateAttachment(taskAttribute, action, monitor);
- } else {
- throw e;
- }
- } else {
- throw e;
- }
- }
- } catch (IOException e) {
- throw new CoreException(new BugzillaStatus(IStatus.ERROR, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_IO, repository.getRepositoryUrl(), e));
- } finally {
- monitor.done();
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java
deleted file mode 100644
index 0842358ca..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/BugzillaVersion.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.Serializable;
-
-/**
- * @author Frank Becker
- */
-public class BugzillaVersion implements Comparable<BugzillaVersion>, Serializable {
-
- private static final long serialVersionUID = 2027987556171301044L;
-
- public final static BugzillaVersion MIN_VERSION = new BugzillaVersion("2.18"); //$NON-NLS-1$
-
- public final static BugzillaVersion BUGZILLA_2_18 = new BugzillaVersion("2.18"); //$NON-NLS-1$
-
- public final static BugzillaVersion BUGZILLA_2_22 = new BugzillaVersion("2.22"); //$NON-NLS-1$
-
- public final static BugzillaVersion BUGZILLA_3_0 = new BugzillaVersion("3.0"); //$NON-NLS-1$
-
- public final static BugzillaVersion BUGZILLA_3_2 = new BugzillaVersion("3.2"); //$NON-NLS-1$
-
- public final static BugzillaVersion BUGZILLA_3_4 = new BugzillaVersion("3.4"); //$NON-NLS-1$
-
- public final static BugzillaVersion MAX_VERSION = new BugzillaVersion("3.4"); //$NON-NLS-1$
-
- private final int major;
-
- private final int minor;
-
- private int micro;
-
- private final boolean rc;
-
- public BugzillaVersion(String version) {
- String[] segments;
- if (version == null) {
- segments = new String[0];
- rc = false;
- } else {
- rc = version.contains("RC"); //$NON-NLS-1$
- segments = rc ? version.split("(\\.|([R][C]))") : version.split("\\."); //$NON-NLS-1$ //$NON-NLS-2$
- }
- major = segments.length > 0 ? parse(segments[0]) : 0;
- minor = segments.length > 1 ? parse(segments[1]) : 0;
- micro = segments.length > 2 ? parse(segments[2]) : 0;
- if (rc) {
- micro -= 100;
- }
- }
-
- private int parse(String segment) {
- try {
- return segment.length() == 0 ? 0 : Integer.parseInt(getVersion(segment));
- } catch (NumberFormatException ex) {
- return 0;
- }
- }
-
- private String getVersion(String segment) {
- int n = segment.indexOf('-');
- return n == -1 ? segment : segment.substring(0, n);
- }
-
- public boolean isSmallerOrEquals(BugzillaVersion v) {
- return compareTo(v) <= 0;
- }
-
- public int compareTo(BugzillaVersion v) {
- if (major < v.major) {
- return -1;
- } else if (major > v.major) {
- return 1;
- }
-
- if (minor < v.minor) {
- return -1;
- } else if (minor > v.minor) {
- return 1;
- }
-
- if (micro < v.micro) {
- return -1;
- } else if (micro > v.micro) {
- return 1;
- }
-
- return 0;
- }
-
- public int compareMajorMinorOnly(BugzillaVersion v) {
- if (major < v.major) {
- return -1;
- } else if (major > v.major) {
- return 1;
- }
-
- if (minor < v.minor) {
- return -1;
- } else if (minor > v.minor) {
- return 1;
- }
- return 0;
- }
-
- @Override
- public String toString() {
- StringBuilder sb = new StringBuilder();
- sb.append(Integer.toString(major));
- sb.append(".").append(Integer.toString(minor)); //$NON-NLS-1$
- if (micro > 0) {
- sb.append(".").append(Integer.toString(micro)); //$NON-NLS-1$
- } else if (micro < 0) {
- sb.append("RC").append(Integer.toString(micro + 100)); //$NON-NLS-1$
- }
- return sb.toString();
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
deleted file mode 100644
index bf6dfbcc8..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipGetMethod.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Maarten Meijer 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:
- * Maarten Meijer - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.IOException;
-
-import org.apache.commons.httpclient.HttpConnection;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpState;
-import org.apache.commons.httpclient.methods.GetMethod;
-
-/**
- * Use <code>GzipGetMethod</code> instead of {@link GetMethod} to make Mylyn well-behaved when accessing repositories
- * that can supply gzipped responses.<br />
- * <br>
- * References:
- * <ul>
- * <li><a href="http://www.schroepl.net/projekte/mod_gzip/index.htm">Gzip home</a></li>
- * <li><a href="http://www.oreilly.com/catalog/9780596529307/chapter/ch04.pdf">Gzip site comparison</a></li>
- * </ul>
- *
- * @see GzipPostMethod, GetMethod
- *
- * @author Maarten Meijer
- */
-public class GzipGetMethod extends GetMethod {
- private final boolean gzipWanted;
-
- /**
- * @param requestPath
- * the URI to request
- * @param gzipWanted
- * is compression desired (for debugging or optionalizing)
- */
- public GzipGetMethod(String requestPath, boolean gzipWanted) {
- super(requestPath);
- this.gzipWanted = gzipWanted;
- }
-
- @Override
- public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
- // Insert accept-encoding header
- if (gzipWanted) {
- this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP); //$NON-NLS-1$
- }
- int result = super.execute(state, conn);
- return result;
- }
-
- /**
- * getResponseBodyNoop is meant for clearing the response body in case of error. The result is never used so no need
- * to unzip it first.
- *
- * @throws IOException
- */
- public void getResponseBodyNoop() throws IOException {
- // result is ignored
- super.getResponseBody();
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
deleted file mode 100644
index d85e002e1..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/GzipPostMethod.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 Maarten Meijer 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:
- * Maarten Meijer - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core;
-
-import java.io.IOException;
-
-import org.apache.commons.httpclient.HttpConnection;
-import org.apache.commons.httpclient.HttpException;
-import org.apache.commons.httpclient.HttpState;
-import org.apache.commons.httpclient.methods.PostMethod;
-
-/**
- * Use <code>GzipPostMethod</code> instead of {@link PostMethod} to make Mylyn well-behaved when accessing repositories
- * that can supply gzipped responses.<br />
- * <br>
- * References:
- * <ul>
- * <li><a href="http://www.schroepl.net/projekte/mod_gzip/index.htm">Gzip home</a></li>
- * <li><a href="http://www.oreilly.com/catalog/9780596529307/chapter/ch04.pdf">Gzip site comparison</a></li>
- * </ul>
- *
- * @see GzipGetMethod, PostMethod
- *
- * @author Maarten Meijer
- */
-public class GzipPostMethod extends PostMethod {
- private final boolean gzipWanted;
-
- /**
- * @param requestPath
- * the URI to request
- * @param gzipWanted
- * is compression desired (for debugging or optionalizing)
- */
- public GzipPostMethod(String requestPath, boolean gzipWanted) {
- super(requestPath);
- this.gzipWanted = gzipWanted;
- }
-
- @Override
- public int execute(HttpState state, HttpConnection conn) throws HttpException, IOException {
- // Insert accept-encoding header
- if (gzipWanted) {
- this.setRequestHeader("Accept-encoding", IBugzillaConstants.CONTENT_ENCODING_GZIP); //$NON-NLS-1$
- }
- int result = super.execute(state, conn);
- return result;
- }
-
- /**
- * getResponseBodyNoop is meant for clearing the response body in case of error. The result is never used so no need
- * to unzip it first.
- *
- * @throws IOException
- */
- public void getResponseBodyNoop() throws IOException {
- // result is ignored
- super.getResponseBody();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
deleted file mode 100644
index 6f05b61d4..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/IBugzillaConstants.java
+++ /dev/null
@@ -1,273 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-/**
- * @author Mik Kersten
- */
-public interface IBugzillaConstants {
-
- //public static final String POST_ARGS_PASSWORD = "&Bugzilla_password=";
- //public static final String POST_ARGS_LOGIN = "GoAheadAndLogIn=1&Bugzilla_login=";
-
- public static final String PROPERTY_CONFIGTIMESTAMP = "org.eclipse.mylyn.tasklist.repositories.config.timestamp"; //$NON-NLS-1$
-
- static final String ERROR_MIDAIR_COLLISION = "collision"; //$NON-NLS-1$
-
- static final String ERROR_MSG_MIDAIR_COLLISION = "A mid-air collision has occurred. Please synchronize by selecting Synchronize in the task's context menu."; //$NON-NLS-1$
-
- static final String ERROR_COMMENT_REQUIRED = "comment required"; //$NON-NLS-1$
-
- static final String ERROR_MSG_COMMENT_REQUIRED = "You have to specify a new comment when making this change. Please comment on the reason for this change."; //$NON-NLS-1$
-
- static final String ERROR_INVALID_USERNAME_OR_PASSWORD = "Invalid Username or Password"; //$NON-NLS-1$
-
- static final String LOGGED_OUT = "logged out"; //$NON-NLS-1$
-
- static final String MOST_RECENT_QUERY = "org.eclipse.mylyn.bugzilla.query.last"; //$NON-NLS-1$
-
- static final String SERVER_VERSION = "org.eclipse.mylyn.bugzilla.server.version"; //$NON-NLS-1$
-
- public static final int RETURN_ALL_HITS = -1;
-
- public static final String CONTENT_TYPE_RDF = "&ctype=rdf"; //$NON-NLS-1$
-
- public static final String POST_INPUT_BUGZILLA_PASSWORD = "Bugzilla_password"; //$NON-NLS-1$
-
- public static final String POST_INPUT_BUGZILLA_LOGIN = "Bugzilla_login"; //$NON-NLS-1$
-
- public static final String POST_INPUT_BUGID = "bugid"; //$NON-NLS-1$
-
- public static final String POST_INPUT_ACTION = "action"; //$NON-NLS-1$
-
- public static final String POST_INPUT_COMMENT = "comment"; //$NON-NLS-1$
-
- public static final String POST_INPUT_DESCRIPTION = "description"; //$NON-NLS-1$
-
- public static final String POST_INPUT_DATA = "data"; //$NON-NLS-1$
-
- public static final String URL_POST_LOGIN = "/index.cgi"; //$NON-NLS-1$
-
- public static final String URL_POST_ATTACHMENT_UPLOAD = "/attachment.cgi"; //$NON-NLS-1$
-
- public static final String URL_BUGLIST = "/buglist.cgi"; //$NON-NLS-1$
-
- public static final String URL_GET_ATTACHMENT_DOWNLOAD = "/attachment.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_GET_ATTACHMENT_SUFFIX = "/attachment.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_BUG_ACTIVITY = "/show_activity.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_SHOW_VOTES = "/votes.cgi?action=show_bug&bug_id="; //$NON-NLS-1$
-
- public static final String URL_VOTE = "/votes.cgi?action=show_user&bug_id="; //$NON-NLS-1$
-
- public static final String URL_DEPENDENCY_TREE = "/showdependencytree.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_DEPENDENCY_GRAPH = "/showdependencygraph.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_GET_SHOW_BUG = "/show_bug.cgi?id="; //$NON-NLS-1$
-
- public static final String URL_GET_CONFIG_RDF = "/config.cgi?ctype=rdf"; //$NON-NLS-1$
-
- //For including fields in the xml (XML Summary mode as they like to call it)
- //use &field=fieldname for example to only reveal the product information append &field=product
- //to exclude from the xml use excludefield=fieldname. See bugzilla QuckSearch for a list of
- //fields that can be used (repositoryurl/quicksearchhack.html).
- //If somebody knows where this is officially documented I'd appreciate it if they would post a link here
- // and on bug#161321. Thanks -relves
- // (see also: https://bugzilla.mozilla.org/show_bug.cgi?id=136603https://bugzilla.mozilla.org/show_bug.cgi?id=136603)
- public static final String URL_GET_SHOW_BUG_XML = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata&id="; //$NON-NLS-1$
-
- public static final String URL_GET_SHOW_BUG_XML_NOID = "/show_bug.cgi?ctype=xml&excludefield=attachmentdata"; //$NON-NLS-1$
-
- public static final String URL_POST_SHOW_BUG = "/show_bug.cgi"; //$NON-NLS-1$
-
- public static final String XML_ERROR_INVALIDBUGID = "invalidbugid"; //$NON-NLS-1$
-
- public static final String XML_ERROR_NOTFOUND = "notfound"; //$NON-NLS-1$
-
- public static final String XML_ERROR_NOTPERMITTED = "notpermitted"; //$NON-NLS-1$
-
- public static final String ENCODING_UTF_8 = "UTF-8"; //$NON-NLS-1$
-
- public static final int REPOSITORY_STATUS_SUSPICIOUS_ACTION = 99;
-
- /** Supported bugzilla repository versions */
- static public enum BugzillaServerVersion {
- SERVER_218, SERVER_220, SERVER_222, SERVER_30;
-
- @Override
- public String toString() {
- switch (this) {
- case SERVER_30:
- return "3.0"; //$NON-NLS-1$
- case SERVER_222:
- return "2.22"; //$NON-NLS-1$
- case SERVER_220:
- return "2.20"; //$NON-NLS-1$
- case SERVER_218:
- return "2.18"; //$NON-NLS-1$
- default:
- return "null"; //$NON-NLS-1$
- }
- }
-
- /** returns null if version string unknown* */
- static public BugzillaServerVersion fromString(String version) {
- if (version.equals(SERVER_30.toString())) {
- return SERVER_30;
- }
- if (version.equals(SERVER_222.toString())) {
- return SERVER_222;
- }
- if (version.equals(SERVER_220.toString())) {
- return SERVER_220;
- }
- if (version.equals(SERVER_218.toString())) {
- return SERVER_218;
- }
- return null;
- }
- }
-
- /**
- * Current Stable Major Release
- */
- public static final BugzillaServerVersion SERVER_VERSION_DEFAULT = BugzillaServerVersion.SERVER_30;
-
- static final String REFRESH_QUERY = "org.eclipse.mylyn.bugzilla.query.refresh"; //$NON-NLS-1$
-
- static final String MAX_RESULTS = "org.eclipse.mylyn.bugzilla.search.results.max"; //$NON-NLS-1$
-
- // names for the resources used to hold the different attributes of a bug
- static final String VALUES_STATUS = "org.eclipse.mylyn.bugzilla.values.status"; //$NON-NLS-1$
-
- static final String VALUES_RESOLUTION = "org.eclipse.mylyn.bugzilla.values.resolution"; //$NON-NLS-1$
-
- static final String VALUES_COMPONENT = "org.eclipse.mylyn.bugzilla.values.component"; //$NON-NLS-1$
-
- static final String VALUES_VERSION = "org.eclipse.mylyn.bugzilla.values.version"; //$NON-NLS-1$
-
- static final String VALUES_TARGET = "org.eclipse.mylyn.bugzilla.values.target"; //$NON-NLS-1$
-
- static final String ECLIPSE_BUGZILLA_URL = "https://bugs.eclipse.org/bugs"; //$NON-NLS-1$
-
- // Default values for keys
-
- static final String[] DEFAULT_STATUS_VALUES = { "Unconfirmed", "New", "Assigned", "Reopened", "Resolved", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$
- "Verified", "Closed" }; //$NON-NLS-1$//$NON-NLS-2$
-
- static final String[] DEFAULT_PRESELECTED_STATUS_VALUES = { "New", "Assigned", "Reopened" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
-
- // static final String[] DEFAULT_RESOLUTION_VALUES = { "Fixed", "Invalid",
- // "Wontfix", "Later", "Remind", "Duplicate",
- // "Worksforme", "Moved" };
-
- static final String[] DEFAULT_SEVERITY_VALUES = { "blocker", "critical", "major", "normal", "minor", "trivial", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
- "enhancement" }; //$NON-NLS-1$
-
- static final String[] DEFAULT_PRIORITY_VALUES = { "P1", "P2", "P3", "P4", "P5" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
-
- static final String[] DEFAULT_HARDWARE_VALUES = { "All", "Macintosh", "PC", "Power PC", "Sun", "Other" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
-
- static final String[] DEFAULT_OS_VALUES = { "All", "AIX Motif", "Windows 95", "Windows 98", "Windows CE", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$
- "Windows ME", "Windows 2000", "Windows NT", "Windows XP", "Windows All", "MacOS X", "Linux", "Linux-GTK", //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$
- "Linux-Motif", "HP-UX", "Neutrino", "QNX-Photon", "Solaris", "Unix All", "other" }; //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$//$NON-NLS-4$//$NON-NLS-5$//$NON-NLS-6$//$NON-NLS-7$
-
- static final String[] DEFAULT_PRODUCT_VALUES = {};
-
- static final String[] DEFAULT_COMPONENT_VALUES = {};
-
- static final String[] DEFAULT_VERSION_VALUES = {};
-
- static final String[] DEFAULT_TARGET_VALUES = {};
-
- public static final String TITLE_MESSAGE_DIALOG = Messages.IBugzillaConstants_Mylyn_Bugzilla_Connector;
-
- public static final String TITLE_NEW_BUG = Messages.IBugzillaConstants_New_Bugzilla_Report;
-
- public static final String MESSAGE_LOGIN_FAILURE = Messages.IBugzillaConstants_Bugzilla_login_information_or_repository_version_incorrect;
-
- public static final String INVALID_2201_ATTRIBUTE_IGNORED = "EclipsebugsBugzilla2.20.1"; //$NON-NLS-1$
-
- public static final String VALUE_STATUS_RESOLVED = "RESOLVED"; //$NON-NLS-1$
-
- public static final String VALUE_STATUS_NEW = "NEW"; //$NON-NLS-1$
-
- public static final String VALUE_STATUS_CLOSED = "CLOSED"; //$NON-NLS-1$
-
- public static final String VALUE_STATUS_ASSIGNED = "ASSIGNED"; //$NON-NLS-1$
-
- public static final String VALUE_STATUS_VERIFIED = "VERIFIED"; //$NON-NLS-1$
-
- public static final String VALUE_RESOLUTION_LATER = "LATER"; //$NON-NLS-1$
-
- public static enum BUGZILLA_REPORT_STATUS {
- UNCONFIRMED, NEW, ASSIGNED, REOPENED, RESOLVED, VERIFIED, CLOSED, SCHEDULED;
- }
-
- public static enum BUGZILLA_RESOLUTION_2_0 {
- FIXED, INVALID, WONTFIX, LATER, REMIND, WORKSFORME;
- }
-
- public static enum BUGZILLA_RESOLUTION_3_0 {
- FIXED, INVALID, WONTFIX, WORKSFORME;
- }
-
- public static final String ERROR_MSG_OP_NOT_PERMITTED = Messages.IBugzillaConstants_requested_operation_not_permitted;
-
- public static final String ERROR_MSG_INVALID_BUG_ID = Messages.IBugzillaConstants_invalid_bug_id_requested_bug_id_does_not_exist;
-
- public static final String INVALID_CREDENTIALS = Messages.IBugzillaConstants_invalid_repository_credentials;
-
- public static final String SHOW_ACTIVITY = "/show_activity.cgi?id="; //$NON-NLS-1$
-
- public static final String REPOSITORY_SETTING_SHORT_LOGIN = "bugzilla.shortLoginEnabled"; //$NON-NLS-1$
-
- public static final String BUGZILLA_TASK_KIND = "Bug"; //$NON-NLS-1$
-
- static final int MAX_URL_LENGTH = 2000;
-
- public static final String TIMESTAMP_NOT_AVAILABLE = "n/a"; //$NON-NLS-1$
-
- public static final String BUGZILLA_DEF_OS = "bugzilla.default.os"; //$NON-NLS-1$
-
- public static final String BUGZILLA_DEF_PLATFORM = "bugzilla.default.platform"; //$NON-NLS-1$
-
- public static final String BUGZILLA_LANGUAGE_SETTING = "bugzilla.languageSetting"; //$NON-NLS-1$
-
- public static final String DEFAULT_LANG = "en (default)"; //$NON-NLS-1$
-
- // Bugzilla Task Attribute Editor Types
-
- public static final String EDITOR_TYPE_KEYWORDS = "bugzilla.editor.keywords"; //$NON-NLS-1$
-
- public static final String EDITOR_TYPE_REMOVECC = "bugzilla.editor.removecc"; //$NON-NLS-1$
-
- public static final String EDITOR_TYPE_VOTES = "bugzilla.editor.votes"; //$NON-NLS-1$
-
- public static final String EDITOR_TYPE_FLAG = "bugzilla.editor.flag"; //$NON-NLS-1$
-
- public static final String ATTRIBUTE_BUGZILLA_QUERY_CUSTOM = "bugzilla.query.custom"; //$NON-NLS-1$
-
- // Old Tags used for migration
- public static final String TAG_BUGZILLA_QUERY = "BugzillaQuery"; //$NON-NLS-1$
-
- public static final String TAG_BUGZILLA_CUSTOM_QUERY = "BugzillaCustomQuery"; //$NON-NLS-1$
-
- public static final String CONTENT_ENCODING_GZIP = "gzip"; //$NON-NLS-1$
-
- public static final String LAST_PRODUCT_SELECTION = "last.selection.product"; //$NON-NLS-1$
-
- public static final String LAST_COMPONENT_SELECTION = "last.selection.component"; //$NON-NLS-1$
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java
deleted file mode 100644
index 1f542b723..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/KeywordParser.java
+++ /dev/null
@@ -1,7 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2005, 2008 Mylyn project committers 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
- *******************************************************************************/
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java
deleted file mode 100644
index 7debfc6b7..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/Messages.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.core.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file
- reloadMessages();
- }
-
- public static void reloadMessages() {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String BugzillaAttribute_Add;
-
- public static String BugzillaAttribute_Add_CC;
-
- public static String BugzillaAttribute_Add_self_to_CC;
-
- public static String BugzillaAttribute_Additional_Comments;
-
- public static String BugzillaAttribute_Assigned_to;
-
- public static String BugzillaAttribute_Assigned_to_NAME;
-
- public static String BugzillaAttribute_ATTACH_ID;
-
- public static String BugzillaAttribute_attachment;
-
- public static String BugzillaAttribute_Blocks;
-
- public static String BugzillaAttribute_bug;
-
- public static String BugzillaAttribute_Bug_ID;
-
- public static String BugzillaAttribute_bug_when;
-
- public static String BugzillaAttribute_bugzilla;
-
- public static String BugzillaAttribute_CC;
-
- public static String BugzillaAttribute_CC_List;
-
- public static String BugzillaAttribute_Classification;
-
- public static String BugzillaAttribute_Classification_ID;
-
- public static String BugzillaAttribute_Component;
-
- public static String BugzillaAttribute_Content_Type;
-
- public static String BugzillaAttribute_data;
-
- public static String BugzillaAttribute_Date;
-
- public static String BugzillaAttribute_Depends_on__Subtasks_;
-
- public static String BugzillaAttribute_desc;
-
- public static String BugzillaAttribute_Description;
-
- public static String BugzillaAttribute_Due;
-
- public static String BugzillaAttribute_Estimated_Time;
-
- public static String BugzillaAttribute_everconfirmed;
-
- public static String BugzillaAttribute_filename;
-
- public static String BugzillaAttribute_flag;
-
- public static String BugzillaAttribute_Group;
-
- public static String BugzillaAttribute_Keywords;
-
- public static String BugzillaAttribute_Modified;
-
- public static String BugzillaAttribute_new_comment;
-
- public static String BugzillaAttribute_Number_of_comments;
-
- public static String BugzillaAttribute_Obsolete;
-
- public static String BugzillaAttribute_open_status_values;
-
- public static String BugzillaAttribute_Opened;
-
- public static String BugzillaAttribute_OS;
-
- public static String BugzillaAttribute_Patch;
-
- public static String BugzillaAttribute_Platform;
-
- public static String BugzillaAttribute_Priority;
-
- public static String BugzillaAttribute_Product;
-
- public static String BugzillaAttribute_QA_Contact;
-
- public static String BugzillaAttribute_QA_Contact_NAME;
-
- public static String BugzillaAttribute_Reassign_to_default_assignee;
-
- public static String BugzillaAttribute_Remaining;
-
- public static String BugzillaAttribute_Remove_CC;
-
- public static String BugzillaAttribute_REPORT_ACCESSIBLE;
-
- public static String BugzillaAttribute_REPORT_NAME;
-
- public static String BugzillaAttribute_Reporter;
-
- public static String BugzillaAttribute_Resolution;
-
- public static String BugzillaAttribute_Severity;
-
- public static String BugzillaAttribute_Size;
-
- public static String BugzillaAttribute_Status;
-
- public static String BugzillaAttribute_Status_Whiteboard;
-
- public static String BugzillaAttribute_Summary;
-
- public static String BugzillaAttribute_Target_milestone;
-
- public static String BugzillaAttribute_thetext;
-
- public static String BugzillaAttribute_type;
-
- public static String BugzillaAttribute_UNKNOWN;
-
- public static String BugzillaAttribute_URL;
-
- public static String BugzillaAttribute_used_by_search_engine_bugs;
-
- public static String BugzillaAttribute_used_by_search_engine_desc;
-
- public static String BugzillaAttribute_used_by_search_engine_id;
-
- public static String BugzillaAttribute_used_by_search_engine_installation;
-
- public static String BugzillaAttribute_used_by_search_engine_li;
-
- public static String BugzillaAttribute_used_by_search_engine_rdf;
-
- public static String BugzillaAttribute_used_by_search_engine_result;
-
- public static String BugzillaAttribute_used_by_search_engine_seq;
-
- public static String BugzillaAttribute_Version;
-
- public static String BugzillaAttribute_version_of_bugzilla_installed;
-
- public static String BugzillaAttribute_Votes;
-
- public static String BugzillaAttribute_who;
-
- public static String BugzillaAttribute_who_name;
-
- public static String BugzillaAttribute_Worked;
-
- public static String BugzillaClient_could_not_post_form_null_returned;
-
- public static String BugzillaClient_description_required_when_submitting_attachments;
-
- public static String BugzillaOperation_Accept_to_ASSIGNED;
-
- public static String BugzillaOperation_Duplicate_of;
-
- public static String BugzillaOperation_Leave_as_X_X;
-
- public static String BugzillaOperation_Mark_as_CLOSED;
-
- public static String BugzillaOperation_Mark_as_VERIFIED;
-
- public static String BugzillaOperation_Reassign_to;
-
- public static String BugzillaOperation_Reopen_bug;
-
- public static String BugzillaOperation_Resolve_as;
-
- public static String BugzillaOperation_Reassign_to_default_assignee;
-
- public static String BugzillaRepositoryConnector_BUGZILLA_SUPPORTS_2_18_TO_3_0;
-
- public static String BugzillaRepositoryConnector_Check_repository_configuration;
-
- public static String BugzillaRepositoryConnector_checking_for_changed_tasks;
-
- public static String BugzillaRepositoryConnector_Query_for_changed_tasks;
-
- public static String BugzillaRepositoryConnector_running_query;
-
- public static String BugzillaRepositoryConnector_Unrecognized_response_from_server;
-
- public static String BugzillaTaskAttachmentHandler_Getting_attachment;
-
- public static String BugzillaTaskAttachmentHandler_Sending_attachment;
-
- public static String BugzillaTaskAttachmentHandler_unable_to_submit_attachment;
-
- public static String BugzillaTaskDataHandler_Receiving_tasks;
-
- public static String BugzillaTaskDataHandler_Submitting_task;
-
- public static String BugzillaTaskDataHandler_updating_attachment;
-
- public static String IBugzillaConstants_Bugzilla_login_information_or_repository_version_incorrect;
-
- public static String IBugzillaConstants_invalid_bug_id_requested_bug_id_does_not_exist;
-
- public static String IBugzillaConstants_invalid_repository_credentials;
-
- public static String IBugzillaConstants_Mylyn_Bugzilla_Connector;
-
- public static String IBugzillaConstants_New_Bugzilla_Report;
-
- public static String IBugzillaConstants_requested_operation_not_permitted;
-
- public static String SaxMultiBugReportContentHandler_Bug_id_from_server_did_not_match_requested_id;
-
- public static String SaxMultiBugReportContentHandler_id_not_found;
-
- public static String BugzillaStatus_repositoryLoginFailure;
-
- public static String BugzillaStatus_repositoryNotFound;
-
- public static String BugzillaStatus_repositoryCommentRequired;
-
- public static String BugzillaStatus_repositoryCollision;
-
- public static String BugzillaStatus_operationCancelled;
-
- public static String BugzillaStatus_errorIo;
-
- public static String BugzillaStatus_errorInternal;
-
- public static String BugzillaStatus_errorRepository;
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
deleted file mode 100644
index 604d54f53..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/MultiBugReportFactory.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.mylyn.tasks.core.RepositoryStatus;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * Reads bug reports from repository.
- *
- * @author Rob Elves
- */
-public class MultiBugReportFactory extends AbstractReportFactory {
-
- public MultiBugReportFactory(InputStream inStream, String encoding) {
- super(inStream, encoding);
- }
-
- public void populateReport(Map<String, TaskData> bugMap, TaskDataCollector collector, TaskAttributeMapper mapper,
- List<BugzillaCustomField> customFields) throws IOException, CoreException {
-
- SaxMultiBugReportContentHandler contentHandler = new SaxMultiBugReportContentHandler(mapper, collector, bugMap,
- customFields);
- collectResults(contentHandler, false);
-
- if (contentHandler.errorOccurred()) {
- String errorResponse = contentHandler.getErrorMessage().toLowerCase(Locale.ENGLISH);
- if (errorResponse.equals(IBugzillaConstants.XML_ERROR_NOTFOUND)
- || errorResponse.equals(IBugzillaConstants.XML_ERROR_INVALIDBUGID)) {
- throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY, "", IBugzillaConstants.ERROR_MSG_INVALID_BUG_ID)); //$NON-NLS-1$
- } else if (errorResponse.equals(IBugzillaConstants.XML_ERROR_NOTPERMITTED)) {
- BugzillaStatus status = new BugzillaStatus(IStatus.INFO, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY_LOGIN, mapper.getTaskRepository().getRepositoryUrl(),
- IBugzillaConstants.ERROR_MSG_OP_NOT_PERMITTED);
- throw new CoreException(status);
- } else {
- throw new CoreException(new BugzillaStatus(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN,
- RepositoryStatus.ERROR_REPOSITORY, "", "Unexpected error occurred: " + errorResponse)); //$NON-NLS-1$ //$NON-NLS-2$
- }
- }
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
deleted file mode 100644
index 4084cc355..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfiguration.java
+++ /dev/null
@@ -1,710 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants.BUGZILLA_REPORT_STATUS;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskOperation;
-
-/**
- * Class describing the configuration of products and components for a given Bugzilla installation.
- *
- * @author Rob Elves
- */
-public class RepositoryConfiguration implements Serializable {
-
- private static final long serialVersionUID = -1162588743524741054L;
-
- private String repositoryUrl = "<unknown>"; //$NON-NLS-1$
-
- private final Map<String, ProductEntry> products = new HashMap<String, ProductEntry>();
-
- private final List<String> platforms = new ArrayList<String>();
-
- private final List<String> operatingSystems = new ArrayList<String>();
-
- private final List<String> priorities = new ArrayList<String>();
-
- private final List<String> severities = new ArrayList<String>();
-
- private final List<String> bugStatus = new ArrayList<String>();
-
- private final List<String> openStatusValues = new ArrayList<String>();
-
- private final List<String> resolutionValues = new ArrayList<String>();
-
- private final List<String> keywords = new ArrayList<String>();
-
- // master lists
-
- private final List<String> versions = new ArrayList<String>();
-
- private final List<String> components = new ArrayList<String>();
-
- private final List<String> milestones = new ArrayList<String>();
-
- private final List<BugzillaCustomField> customFields = new ArrayList<BugzillaCustomField>();
-
- private final List<BugzillaFlag> flags = new ArrayList<BugzillaFlag>();
-
- private BugzillaVersion version = BugzillaVersion.MIN_VERSION;
-
- private String encoding = null;
-
- public RepositoryConfiguration() {
- super();
- }
-
- public void addStatus(String status) {
- bugStatus.add(status);
- }
-
- public List<String> getStatusValues() {
- return bugStatus;
- }
-
- public void addResolution(String res) {
- resolutionValues.add(res);
- }
-
- public List<String> getResolutions() {
- return resolutionValues;
- }
-
- /**
- * Adds a product to the configuration.
- */
- public void addProduct(String name) {
- if (!products.containsKey(name)) {
- ProductEntry product = new ProductEntry(name);
- products.put(name, product);
- }
- }
-
- /**
- * Returns an array of names of current products.
- */
- public List<String> getProducts() {
- ArrayList<String> productList = new ArrayList<String>(products.keySet());
- Collections.sort(productList);
- return productList;
- }
-
- /**
- * Returns an array of names of component that exist for a given product or <code>null</code> if the product does
- * not exist.
- */
- public List<String> getComponents(String product) {
- ProductEntry entry = products.get(product);
- if (entry != null) {
- return entry.getComponents();
- } else {
- return Collections.emptyList();
- }
- }
-
- /**
- * Returns an array of names of versions that exist for a given product or <code>null</code> if the product does not
- * exist.
- */
- public List<String> getVersions(String product) {
- ProductEntry entry = products.get(product);
- if (entry != null) {
- return entry.getVersions();
- } else {
- return Collections.emptyList();
- }
- }
-
- /**
- * Returns an array of names of valid severity values.
- */
- public List<String> getSeverities() {
- return severities;
- }
-
- /**
- * Returns an array of names of valid OS values.
- */
- public List<String> getOSs() {
- return operatingSystems;
- }
-
- public void addOS(String os) {
- operatingSystems.add(os);
- }
-
- /**
- * Returns an array of names of valid platform values.
- */
- public List<String> getPlatforms() {
- return platforms;
- }
-
- /**
- * Returns an array of names of valid platform values.
- */
- public List<String> getPriorities() {
- return priorities;
- }
-
- /**
- * Adds a component to the given product.
- */
- public void addComponent(String product, String component) {
- if (!components.contains(component)) {
- components.add(component);
- }
- ProductEntry entry = products.get(product);
- if (entry == null) {
- entry = new ProductEntry(product);
- products.put(product, entry);
- }
- entry.addComponent(component);
- }
-
- public void addVersion(String product, String version) {
- if (!versions.contains(version)) {
- versions.add(version);
- }
- ProductEntry entry = products.get(product);
- if (entry == null) {
- entry = new ProductEntry(product);
- products.put(product, entry);
- }
- entry.addVersion(version);
- }
-
- public void addKeyword(String keyword) {
- keywords.add(keyword);
- }
-
- public List<String> getKeywords() {
- return keywords;
- }
-
- public void addPlatform(String platform) {
- platforms.add(platform);
- }
-
- public void addPriority(String priority) {
- priorities.add(priority);
- }
-
- public void addSeverity(String severity) {
- severities.add(severity);
-
- }
-
- public void setInstallVersion(String version) {
- this.version = new BugzillaVersion(version);
- }
-
- public BugzillaVersion getInstallVersion() {
- return version;
- }
-
- public void addTargetMilestone(String product, String target) {
- if (!milestones.contains(target)) {
- milestones.add(target);
- }
- ProductEntry entry = products.get(product);
- if (entry == null) {
- entry = new ProductEntry(product);
- products.put(product, entry);
- }
-
- entry.addTargetMilestone(target);
-
- }
-
- public List<String> getTargetMilestones(String product) {
- ProductEntry entry = products.get(product);
- if (entry != null) {
- return entry.getTargetMilestones();
- } else {
- return Collections.emptyList();
- }
- }
-
- /**
- * Container for product information: name, components.
- */
- private static class ProductEntry implements Serializable {
-
- private static final long serialVersionUID = 4120139521246741120L;
-
- @SuppressWarnings("unused")
- String productName;
-
- List<String> components = new ArrayList<String>();
-
- List<String> versions = new ArrayList<String>();
-
- List<String> milestones = new ArrayList<String>();
-
- ProductEntry(String name) {
- this.productName = name;
- }
-
- List<String> getComponents() {
- return components;
- }
-
- void addComponent(String componentName) {
- if (!components.contains(componentName)) {
- components.add(componentName);
- }
- }
-
- List<String> getVersions() {
- return versions;
- }
-
- void addVersion(String name) {
- if (!versions.contains(name)) {
- versions.add(name);
- }
- }
-
- List<String> getTargetMilestones() {
- return milestones;
- }
-
- void addTargetMilestone(String target) {
- milestones.add(target);
- }
- }
-
- public List<String> getOpenStatusValues() {
- return openStatusValues;
- }
-
- public void addOpenStatusValue(String value) {
- openStatusValues.add(value);
- }
-
- public List<String> getComponents() {
- return components;
- }
-
- public List<String> getTargetMilestones() {
- return milestones;
- }
-
- public List<String> getVersions() {
- return versions;
- }
-
- public String getRepositoryUrl() {
- return repositoryUrl;
- }
-
- public void setRepositoryUrl(String repositoryUrl) {
- this.repositoryUrl = repositoryUrl;
- }
-
- /*
- * Intermediate step until configuration is made generic.
- */
- public List<String> getOptionValues(BugzillaAttribute element, String product) {
- switch (element) {
- case PRODUCT:
- return getProducts();
- case TARGET_MILESTONE:
- return getTargetMilestones(product);
- case BUG_STATUS:
- return getStatusValues();
- case VERSION:
- return getVersions(product);
- case COMPONENT:
- return getComponents(product);
- case REP_PLATFORM:
- return getPlatforms();
- case OP_SYS:
- return getOSs();
- case PRIORITY:
- return getPriorities();
- case BUG_SEVERITY:
- return getSeverities();
- case KEYWORDS:
- return getKeywords();
- case RESOLUTION:
- return getResolutions();
- default:
- return Collections.emptyList();
- }
- }
-
- /**
- * Adds a field to the configuration.
- */
- public void addCustomField(BugzillaCustomField newField) {
- customFields.add(newField);
- }
-
- public List<BugzillaCustomField> getCustomFields() {
- return customFields;
- }
-
- public void configureTaskData(TaskData taskData) {
- if (taskData != null) {
- addMissingFlags(taskData);
- updateAttributeOptions(taskData);
- addValidOperations(taskData);
- }
- }
-
- private void addMissingFlags(TaskData taskData) {
- List<String> existingFlags = new ArrayList<String>();
- List<BugzillaFlag> flags = getFlags();
- for (TaskAttribute attribute : new HashSet<TaskAttribute>(taskData.getRoot().getAttributes().values())) {
- if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
- if (state != null) {
- String nameValue = state.getMetaData().getLabel();
- if (!existingFlags.contains(nameValue)) {
- existingFlags.add(nameValue);
- }
- String desc = attribute.getMetaData().getLabel();
- if (desc == null || desc.equals("")) { //$NON-NLS-1$
- for (BugzillaFlag bugzillaFlag : flags) {
- if (bugzillaFlag.getType().equals("attachment")) { //$NON-NLS-1$
- continue;
- }
- if (bugzillaFlag.getName().equals(nameValue)) {
- attribute.getMetaData().setLabel(bugzillaFlag.getDescription());
- }
- }
- }
- }
- }
- }
- TaskAttribute productAttribute = taskData.getRoot().getMappedAttribute(BugzillaAttribute.PRODUCT.getKey());
- TaskAttribute componentAttribute = taskData.getRoot().getMappedAttribute(BugzillaAttribute.COMPONENT.getKey());
- for (BugzillaFlag bugzillaFlag : flags) {
- if (bugzillaFlag.getType().equals("attachment")) { //$NON-NLS-1$
- continue;
- }
- if (!bugzillaFlag.isUsedIn(productAttribute.getValue(), componentAttribute.getValue())) {
- continue;
- }
- if (existingFlags.contains(bugzillaFlag.getName()) && !bugzillaFlag.isMultiplicable()) {
- continue;
- }
- BugzillaFlagMapper mapper = new BugzillaFlagMapper();
- mapper.setRequestee(""); //$NON-NLS-1$
- mapper.setSetter(""); //$NON-NLS-1$
- mapper.setState(" "); //$NON-NLS-1$
- mapper.setFlagId(bugzillaFlag.getName());
- mapper.setNumber(0);
- mapper.setDescription(bugzillaFlag.getDescription());
- TaskAttribute attribute = taskData.getRoot().createAttribute(
- "task.common.kind.flag_type" + bugzillaFlag.getFlagId()); //$NON-NLS-1$
- mapper.applyTo(attribute);
- }
- setFlagsRequestee(taskData);
- }
-
- private void setFlagsRequestee(TaskData taskData) {
- for (TaskAttribute attribute : new HashSet<TaskAttribute>(taskData.getRoot().getAttributes().values())) {
- if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
- if (state != null) {
- String nameValue = state.getMetaData().getLabel();
- for (BugzillaFlag bugzillaFlag : flags) {
- if (nameValue.equals(bugzillaFlag.getName())) {
- TaskAttribute requestee = attribute.getAttribute("requestee"); //$NON-NLS-1$
- if (requestee == null) {
- requestee = attribute.createMappedAttribute("requestee"); //$NON-NLS-1$
- requestee.getMetaData().defaults().setType(TaskAttribute.TYPE_SHORT_TEXT);
- requestee.setValue(""); //$NON-NLS-1$
- }
- requestee.getMetaData().setReadOnly(!bugzillaFlag.isSpecifically_requestable());
- }
- }
- }
- }
- }
- }
-
- public void updateAttributeOptions(TaskData existingReport) {
- TaskAttribute attributeProduct = existingReport.getRoot()
- .getMappedAttribute(BugzillaAttribute.PRODUCT.getKey());
- if (attributeProduct == null) {
- return;
- }
- String product = attributeProduct.getValue();
- for (TaskAttribute attribute : new HashSet<TaskAttribute>(existingReport.getRoot().getAttributes().values())) {
-
- List<String> optionValues = getAttributeOptions(product, attribute);
-
- if (attribute.getId().equals(BugzillaAttribute.TARGET_MILESTONE.getKey()) && optionValues.isEmpty()) {
- existingReport.getRoot().removeAttribute(BugzillaAttribute.TARGET_MILESTONE.getKey());
- continue;
- }
-
- if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
- attribute = attribute.getAttribute("state"); //$NON-NLS-1$
- }
-
- attribute.clearOptions();
- for (String option : optionValues) {
- attribute.putOption(option, option);
- }
- }
-
- }
-
- public List<String> getAttributeOptions(String product, TaskAttribute attribute) {
- List<String> options = new ArrayList<String>();
-
- if (attribute.getId().startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- if (bugzillaCustomField.getName().equals(attribute.getId())) {
- options = bugzillaCustomField.getOptions();
- break;
- }
- }
-
- } else if (attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$
-
- TaskAttribute state = attribute.getAttribute("state"); //$NON-NLS-1$
- if (state != null) {
- String nameValue = state.getMetaData().getLabel();
- options.add(""); //$NON-NLS-1$
- for (BugzillaFlag bugzillaFlag : flags) {
- if (nameValue.equals(bugzillaFlag.getName())) {
- if (nameValue.equals(bugzillaFlag.getName())) {
- if (bugzillaFlag.isRequestable()) {
- options.add("?"); //$NON-NLS-1$
- }
- break;
- }
- }
- }
- options.add("+"); //$NON-NLS-1$
- options.add("-"); //$NON-NLS-1$
- }
- }
-
- else {
- String type = attribute.getMetaData().getType();
-
- if (type != null && type.equals(IBugzillaConstants.EDITOR_TYPE_FLAG)) {
- options.add(""); //$NON-NLS-1$
- options.add("?"); //$NON-NLS-1$
- options.add("+"); //$NON-NLS-1$
- options.add("-"); //$NON-NLS-1$
- } else {
-
- BugzillaAttribute element;
- try {
- element = BugzillaAttribute.valueOf(attribute.getId().trim().toUpperCase(Locale.ENGLISH));
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return options;
- }
- throw e;
- }
-
- options = getOptionValues(element, product);
-
- if (element != BugzillaAttribute.RESOLUTION && element != BugzillaAttribute.OP_SYS
- && element != BugzillaAttribute.BUG_SEVERITY && element != BugzillaAttribute.PRIORITY
- && element != BugzillaAttribute.BUG_STATUS) {
- Collections.sort(options);
- }
- }
- }
- return options;
- }
-
- public void addValidOperations(TaskData bugReport) {
- TaskAttribute attributeStatus = bugReport.getRoot().getMappedAttribute(TaskAttribute.STATUS);
- BUGZILLA_REPORT_STATUS status = BUGZILLA_REPORT_STATUS.NEW;
- if (attributeStatus != null) {
- try {
- status = BUGZILLA_REPORT_STATUS.valueOf(attributeStatus.getValue());
- } catch (RuntimeException e) {
-// StatusHandler.log(new Status(IStatus.INFO, BugzillaCorePlugin.PLUGIN_ID, "Unrecognized status: "
-// + attributeStatus.getValue(), e));
- status = BUGZILLA_REPORT_STATUS.NEW;
- }
- }
- BugzillaVersion bugzillaVersion = getInstallVersion();
- if (bugzillaVersion == null) {
- bugzillaVersion = BugzillaVersion.MIN_VERSION;
- }
- switch (status) {
- case UNCONFIRMED:
- case REOPENED:
- case NEW:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.accept);
- addOperation(bugReport, BugzillaOperation.resolve);
- addOperation(bugReport, BugzillaOperation.duplicate);
- break;
- case ASSIGNED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.resolve);
- addOperation(bugReport, BugzillaOperation.duplicate);
- break;
- case RESOLVED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.reopen);
- addOperation(bugReport, BugzillaOperation.verify);
- addOperation(bugReport, BugzillaOperation.close);
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_0) >= 0) {
- addOperation(bugReport, BugzillaOperation.duplicate);
- addOperation(bugReport, BugzillaOperation.resolve);
- }
- break;
- case CLOSED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.reopen);
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_0) >= 0) {
- addOperation(bugReport, BugzillaOperation.duplicate);
- addOperation(bugReport, BugzillaOperation.resolve);
- }
- break;
- case VERIFIED:
- addOperation(bugReport, BugzillaOperation.none);
- addOperation(bugReport, BugzillaOperation.reopen);
- addOperation(bugReport, BugzillaOperation.close);
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_0) >= 0) {
- addOperation(bugReport, BugzillaOperation.duplicate);
- addOperation(bugReport, BugzillaOperation.resolve);
- }
- }
-
- if (bugzillaVersion.compareTo(BugzillaVersion.BUGZILLA_3_0) < 0) {
- // Product change is only supported for Versions >= 3.0 without verify html page
- TaskAttribute productAttribute = bugReport.getRoot().getMappedAttribute(BugzillaAttribute.PRODUCT.getKey());
- productAttribute.getMetaData().setReadOnly(true);
- }
-
- if (status == BUGZILLA_REPORT_STATUS.NEW || status == BUGZILLA_REPORT_STATUS.ASSIGNED
- || status == BUGZILLA_REPORT_STATUS.REOPENED || status == BUGZILLA_REPORT_STATUS.UNCONFIRMED) {
- if (bugzillaVersion.compareMajorMinorOnly(BugzillaVersion.BUGZILLA_3_0) <= 0) {
- // old bugzilla workflow is used
- addOperation(bugReport, BugzillaOperation.reassign);
- addOperation(bugReport, BugzillaOperation.reassignbycomponent);
- } else {
- BugzillaAttribute key = BugzillaAttribute.SET_DEFAULT_ASSIGNEE;
- TaskAttribute operationAttribute = bugReport.getRoot().getAttribute(key.getKey());
- if (operationAttribute == null) {
- operationAttribute = bugReport.getRoot().createAttribute(key.getKey());
- operationAttribute.getMetaData()
- .defaults()
- .setReadOnly(key.isReadOnly())
- .setKind(key.getKind())
- .setLabel(key.toString())
- .setType(key.getType());
- operationAttribute.setValue("0"); //$NON-NLS-1$
- }
- operationAttribute = bugReport.getRoot().getMappedAttribute(TaskAttribute.USER_ASSIGNED);
- if (operationAttribute != null) {
- operationAttribute.getMetaData().setReadOnly(false);
- }
- }
- }
- }
-
- public void addOperation(TaskData bugReport, BugzillaOperation opcode) {
- TaskAttribute attribute;
- TaskAttribute operationAttribute = bugReport.getRoot().getAttribute(TaskAttribute.OPERATION);
- if (operationAttribute == null) {
- operationAttribute = bugReport.getRoot().createAttribute(TaskAttribute.OPERATION);
- }
-
- switch (opcode) {
- case none:
- attribute = bugReport.getRoot().createAttribute(TaskAttribute.PREFIX_OPERATION + opcode.toString());
- String label = "Leave"; //$NON-NLS-1$
- TaskAttribute attributeStatus = bugReport.getRoot().getMappedAttribute(TaskAttribute.STATUS);
- TaskAttribute attributeResolution = bugReport.getRoot().getMappedAttribute(TaskAttribute.RESOLUTION);
- if (attributeStatus != null && attributeResolution != null) {
- label = String.format(opcode.getLabel(), attributeStatus.getValue(), attributeResolution.getValue());
- }
-
- TaskOperation.applyTo(attribute, opcode.toString(), label);
- // set as default
- TaskOperation.applyTo(operationAttribute, opcode.toString(), label);
- break;
- case resolve:
- attribute = bugReport.getRoot().createAttribute(TaskAttribute.PREFIX_OPERATION + opcode.toString());
- TaskOperation.applyTo(attribute, opcode.toString(), opcode.getLabel());
- TaskAttribute attrResolvedInput = attribute.getTaskData().getRoot().createAttribute(opcode.getInputId());
- attrResolvedInput.getMetaData().setType(opcode.getInputType());
- attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, opcode.getInputId());
- for (String resolution : getResolutions()) {
- // DUPLICATE and MOVED have special meanings so do not show as resolution
- if (resolution.compareTo("DUPLICATE") != 0 && resolution.compareTo("MOVED") != 0) { //$NON-NLS-1$ //$NON-NLS-2$
- attrResolvedInput.putOption(resolution, resolution);
- }
- }
- if (getResolutions().size() > 0) {
- attrResolvedInput.setValue(getResolutions().get(0));
- }
- break;
- default:
- attribute = bugReport.getRoot().createAttribute(TaskAttribute.PREFIX_OPERATION + opcode.toString());
- TaskOperation.applyTo(attribute, opcode.toString(), opcode.getLabel());
- if (opcode.getInputId() != null) {
- TaskAttribute attrInput = bugReport.getRoot().createAttribute(opcode.getInputId());
- attrInput.getMetaData().defaults().setReadOnly(false).setType(opcode.getInputType());
- attribute.getMetaData().putValue(TaskAttribute.META_ASSOCIATED_ATTRIBUTE_ID, opcode.getInputId());
- }
- break;
- }
- }
-
- /**
- * Adds a flag to the configuration.
- */
- public void addFlag(BugzillaFlag newFlag) {
- flags.add(newFlag);
- }
-
- public List<BugzillaFlag> getFlags() {
- return flags;
- }
-
- public BugzillaFlag getFlagWithId(Integer id) {
- for (BugzillaFlag bugzillaFlag : flags) {
- if (bugzillaFlag.getFlagId() == id) {
- return bugzillaFlag;
- }
- }
- return null;
- }
-
- public void setEncoding(String encoding) {
- this.encoding = encoding;
- }
-
- public String getEncoding() {
- return encoding;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java
deleted file mode 100644
index ae8b26db3..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryConfigurationFactory.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-
-import org.eclipse.core.runtime.CoreException;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
-
-/**
- * Reads bugzilla product configuration from config.cgi on server in RDF format.
- *
- * @author Rob Elves
- */
-public class RepositoryConfigurationFactory extends AbstractReportFactory {
-
- public RepositoryConfigurationFactory(InputStream inStream, String encoding) {
- super(inStream, encoding);
- }
-
- public RepositoryConfiguration getConfiguration() throws IOException, CoreException {
- SaxConfigurationContentHandler contentHandler = new SaxConfigurationContentHandler();
- collectResults(contentHandler, true);
- RepositoryConfiguration config = contentHandler.getConfiguration();
- return config;
- }
-
- class SaxErrorHandler implements ErrorHandler {
-
- public void error(SAXParseException exception) throws SAXException {
- throw exception;
- }
-
- public void fatalError(SAXParseException exception) throws SAXException {
- throw exception;
-
- }
-
- public void warning(SAXParseException exception) throws SAXException {
- // ignore
- }
-
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
deleted file mode 100644
index 2d901598e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/RepositoryQueryResultsFactory.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.security.GeneralSecurityException;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-
-/**
- * @author Rob Elves
- */
-public class RepositoryQueryResultsFactory extends AbstractReportFactory {
-
- public RepositoryQueryResultsFactory(InputStream inStream, String encoding) {
- super(inStream, encoding);
- }
-
- /**
- * expects rdf returned from repository (ctype=rdf in url)
- *
- * @throws GeneralSecurityException
- */
- public int performQuery(String repositoryUrl, TaskDataCollector collector, TaskAttributeMapper mapper, int maxHits)
- throws IOException {
- SaxBugzillaQueryContentHandler contentHandler = new SaxBugzillaQueryContentHandler(repositoryUrl, collector,
- mapper);
- collectResults(contentHandler, false);
- return contentHandler.getResultCount();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
deleted file mode 100644
index ccb40a220..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxBugzillaQueryContentHandler.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.util.Locale;
-
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parser for RDF bugzilla query results.
- *
- * @author Rob Elves
- */
-public class SaxBugzillaQueryContentHandler extends DefaultHandler {
-
- private StringBuffer characters;
-
- private final TaskDataCollector collector;
-
- private final String repositoryUrl;
-
- private int resultCount;
-
- private final TaskAttributeMapper mapper;
-
- private TaskData taskData;
-
- public SaxBugzillaQueryContentHandler(String repositoryUrl, TaskDataCollector collector, TaskAttributeMapper mapper) {
- this.repositoryUrl = repositoryUrl;
- this.collector = collector;
- this.mapper = mapper;
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- characters.append(ch, start, length);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- characters = new StringBuffer();
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- String parsedText = characters.toString();
- BugzillaAttribute tag = BugzillaAttribute.UNKNOWN;
- try {
- tag = BugzillaAttribute.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
- switch (tag) {
- case ID:
- taskData = new TaskData(mapper, getConnectorKind(), repositoryUrl, parsedText);
- taskData.setPartial(true);
- break;
- case SHORT_SHORT_DESC:
- if (taskData != null) {
- BugzillaTaskDataHandler.createAttribute(taskData, BugzillaAttribute.SHORT_DESC)
- .setValue(parsedText);
- }
- break;
- case LI:
- if (taskData != null) {
- collector.accept(taskData);
- }
- resultCount++;
- break;
- default:
- if (taskData != null) {
- BugzillaTaskDataHandler.createAttribute(taskData, tag).setValue(parsedText);
- }
- break;
- }
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return;
- }
- throw e;
- }
-
- }
-
- protected String getConnectorKind() {
- return BugzillaCorePlugin.CONNECTOR_KIND;
- }
-
- public int getResultCount() {
- return resultCount;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
deleted file mode 100644
index d13d9646a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxConfigurationContentHandler.java
+++ /dev/null
@@ -1,586 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Quick config rdf parser.
- *
- * <pre>
- * config.cgi?ctype=rdf
- * </pre>
- *
- * Populates a <link>ProductConfiguration</link> data structure.
- *
- * @author Rob Elves
- */
-public class SaxConfigurationContentHandler extends DefaultHandler {
-
- private static final String ELEMENT_RESOLUTION = "resolution"; //$NON-NLS-1$
-
- private static final String ELEMENT_STATUS_OPEN = "status_open"; //$NON-NLS-1$
-
- private static final String ELEMENT_TARGET_MILESTONE = "target_milestone"; //$NON-NLS-1$
-
- private static final String ELEMENT_TARGET_MILESTONES = "target_milestones"; //$NON-NLS-1$
-
- private static final String ELEMENT_INSTALL_VERSION = "install_version"; //$NON-NLS-1$
-
- private static final String ELEMENT_DB_ENCODING = "db_encoding"; //$NON-NLS-1$
-
- private static final String ATTRIBUTE_RDF_ABOUT = "rdf:about"; //$NON-NLS-1$
-
- private static final String ATTRIBUTE_RESOURCE = "resource"; //$NON-NLS-1$
-
- private static final String ELEMENT_VERSION = "version"; //$NON-NLS-1$
-
- private static final String ELEMENT_VERSIONS = "versions"; //$NON-NLS-1$
-
- private static final String ELEMENT_COMPONENT = "component"; //$NON-NLS-1$
-
- private static final String ELEMENT_COMPONENTS = "components"; //$NON-NLS-1$
-
- private static final String ELEMENT_NAME = "name"; //$NON-NLS-1$
-
- private static final String ELEMENT_PRODUCTS = "products"; //$NON-NLS-1$
-
- private static final String ELEMENT_DESCRIPTION = "description"; //$NON-NLS-1$
-
- private static final String ELEMENT_FIELDS = "fields"; //$NON-NLS-1$
-
- private static final String ELEMENT_FIELD = "field"; //$NON-NLS-1$
-
- private static final String ELEMENT_FLAG_TYPES = "flag_types"; //$NON-NLS-1$
-
- private static final String ELEMENT_FLAG_TYPE = "flag_type"; //$NON-NLS-1$
-
- private static final String ELEMENT_SEVERITY = "severity"; //$NON-NLS-1$
-
- private static final String ELEMENT_PRIORITY = "priority"; //$NON-NLS-1$
-
- private static final String ELEMENT_KEYWORD = "keyword"; //$NON-NLS-1$
-
- private static final String ELEMENT_OP_SYS = "op_sys"; //$NON-NLS-1$
-
- private static final String ELEMENT_PLATFORM = "platform"; //$NON-NLS-1$
-
- private static final String ELEMENT_LI = "li"; //$NON-NLS-1$
-
- private static final String ELEMENT_STATUS = "status"; //$NON-NLS-1$
-
- private static final String ELEMENT_TYPE = "type"; //$NON-NLS-1$
-
- private static final String ELEMENT_ENTER_BUG = "enter_bug"; //$NON-NLS-1$
-
- private static final String ELEMENT_REQUESTABLE = "requestable"; //$NON-NLS-1$
-
- private static final String ELEMENT_SPECIFICALLY_REQUESTABLE = "specifically_requestable"; //$NON-NLS-1$
-
- private static final String ELEMENT_ID = "id"; //$NON-NLS-1$
-
- private static final String ELEMENT_MULTIPLICABLE = "multiplicable"; //$NON-NLS-1$
-
- private static final int EXPECTING_ROOT = 0;
-
- private static final int IN_INSTALL_VERSION = 1 << 1;
-
- private static final int IN_STATUS = 1 << 2;
-
- private static final int IN_PLATFORM = 1 << 3;
-
- private static final int IN_OP_SYS = 1 << 4;
-
- private static final int IN_PRIORITY = 1 << 5;
-
- private static final int IN_SEVERITY = 1 << 6;
-
- private static final int IN_PRODUCTS = 1 << 7;
-
- private static final int IN_COMPONENTS = 1 << 8;
-
- private static final int IN_VERSIONS = 1 << 9;
-
- private static final int IN_LI = 1 << 10;
-
- private static final int IN_LI_LI = 1 << 11;
-
- private static final int IN_NAME = 1 << 12;
-
- private static final int IN_COMPONENT = 1 << 13;
-
- private static final int IN_VERSION = 1 << 14;
-
- private static final int IN_TARGET_MILESTONES = 1 << 15;
-
- private static final int IN_TARGET_MILESTONE = 1 << 16;
-
- private static final int IN_STATUS_OPEN = 1 << 17;
-
- private static final int IN_RESOLUTION = 1 << 18;
-
- private static final int IN_KEYWORD = 1 << 19;
-
- private static final int IN_STATUS_CLOSED = 1 << 20;
-
- private static final int IN_FIELDS = 1 << 21;
-
- private static final int IN_FIELD = 1 << 22;
-
- private static final int IN_CUSTOM_OPTION = 1 << 23;
-
- private static final int IN_FLAG_TYPES = 1 << 24;
-
- private static final int IN_FLAG_TYPE = 1 << 25;
-
- private static final int IN_DB_ENCODING = 1 << 26;
-
- private int state = EXPECTING_ROOT;
-
- private String currentProduct = ""; //$NON-NLS-1$
-
- private String currentName = ""; //$NON-NLS-1$
-
- private String currentDescription = ""; //$NON-NLS-1$
-
- private String currentType;
-
- private String currentRequestable;
-
- private String currentSpecifically_requestable;
-
- private String currentMultiplicable;
-
- private int currentId;
-
- private String currentEnterBug = ""; //$NON-NLS-1$
-
- private StringBuffer characters = new StringBuffer();
-
- private String about;
-
- private final RepositoryConfiguration configuration = new RepositoryConfiguration();
-
- private final Map<String, List<String>> components = new HashMap<String, List<String>>();
-
- private final Map<String, List<String>> versions = new HashMap<String, List<String>>();
-
- private final Map<String, List<String>> milestones = new HashMap<String, List<String>>();
-
- private final Map<String, String> componentNames = new HashMap<String, String>();
-
- private final Map<String, String> versionNames = new HashMap<String, String>();
-
- private final Map<String, String> milestoneNames = new HashMap<String, String>();
-
- private final Map<String, List<String>> customOption = new HashMap<String, List<String>>();
-
- private final Map<String, Map<String, List<String>>> flagsInComponent = new HashMap<String, Map<String, List<String>>>();
-
- private final Map<String, Integer> flagIds = new HashMap<String, Integer>();
-
- private String currentComponent = ""; //$NON-NLS-1$
-
- private String currentCustomOptionName = ""; //$NON-NLS-1$
-
- public RepositoryConfiguration getConfiguration() {
- return configuration;
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- characters.append(ch, start, length);
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- characters = new StringBuffer();
- if (localName.equals(ELEMENT_STATUS)) {
- state = state | IN_STATUS;
- } else if (localName.equals(ELEMENT_LI) && ((state & IN_LI) == IN_LI)) {
- state = state | IN_LI_LI;
- parseResource(attributes);
- } else if (localName.equals(ELEMENT_LI) && ((state & IN_LI) != IN_LI)) {
- state = state | IN_LI;
- } else if (localName.equals(ELEMENT_PLATFORM)) {
- state = state | IN_PLATFORM;
- } else if (localName.equals(ELEMENT_OP_SYS)) {
- state = state | IN_OP_SYS;
- } else if (localName.equals(ELEMENT_PRIORITY)) {
- state = state | IN_PRIORITY;
- } else if (localName.equals(ELEMENT_SEVERITY)) {
- state = state | IN_SEVERITY;
- } else if (localName.equals(ELEMENT_PRODUCTS)) {
- state = state | IN_PRODUCTS;
- } else if (localName.equals(ELEMENT_OP_SYS)) {
- state = state | IN_OP_SYS;
- } else if (localName.equals(ELEMENT_NAME)) {
- state = state | IN_NAME;
- } else if (localName.equals(ELEMENT_COMPONENTS)) {
- state = state | IN_COMPONENTS;
- } else if (localName.equals(ELEMENT_COMPONENT)) {
- state = state | IN_COMPONENT;
- parseResource(attributes);
- } else if (localName.equals(ELEMENT_VERSIONS)) {
- state = state | IN_VERSIONS;
- } else if (localName.equals(ELEMENT_VERSION)) {
- state = state | IN_VERSION;
- parseResource(attributes);
- } else if (localName.equals(ELEMENT_INSTALL_VERSION)) {
- state = state | IN_INSTALL_VERSION;
- } else if (localName.equals(ELEMENT_DB_ENCODING)) {
- state = state | IN_DB_ENCODING;
- } else if (localName.equals(ELEMENT_TARGET_MILESTONES)) {
- state = state | IN_TARGET_MILESTONES;
- } else if (localName.equals(ELEMENT_TARGET_MILESTONE)) {
- state = state | IN_TARGET_MILESTONE;
- parseResource(attributes);
- } else if (localName.equals(ELEMENT_STATUS_OPEN)) {
- state = state | IN_STATUS_OPEN;
- } else if (localName.equals(ELEMENT_RESOLUTION)) {
- state = state | IN_RESOLUTION;
- } else if (localName.equals(ELEMENT_KEYWORD)) {
- state = state | IN_KEYWORD;
- } else if (localName.equals(ELEMENT_FIELDS)) {
- state = state | IN_FIELDS;
- } else if (localName.equals(ELEMENT_FIELD)) {
- state = state | IN_FIELD;
- parseResource(attributes);
- currentName = ""; //$NON-NLS-1$
- currentDescription = ""; //$NON-NLS-1$
- currentType = ""; //$NON-NLS-1$
- currentEnterBug = ""; //$NON-NLS-1$
- currentId = -1;
- } else if (localName.equals(ELEMENT_FLAG_TYPES)) {
- state = state | IN_FLAG_TYPES;
- } else if (localName.equals(ELEMENT_FLAG_TYPE)) {
- state = state | IN_FLAG_TYPE;
- parseResource(attributes);
- } else if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- state = state | IN_CUSTOM_OPTION;
- currentCustomOptionName = localName;
- }
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- // KEEP: && ((state & IN_LI) == IN_LI)
-
- if (localName.equals(ELEMENT_STATUS)) {
- state = state & ~IN_STATUS;
- } else if (localName.equals(ELEMENT_LI) && ((state & IN_LI_LI) == IN_LI_LI)) {
- state = state & ~IN_LI_LI;
- } else if (localName.equals(ELEMENT_LI) && ((state & IN_LI_LI) != IN_LI_LI)) {
- state = state & ~IN_LI;
- if (characters.length() == 0) {
- return;
- }
- if (state == (IN_STATUS)) {
- configuration.addStatus(characters.toString());
- } else if (state == (IN_STATUS_OPEN)) {
- configuration.addOpenStatusValue(characters.toString());
- } else if (state == (IN_STATUS_CLOSED)) {
- // TODO: Add closed status values to configuration
- } else if (state == (IN_RESOLUTION)) {
- configuration.addResolution(characters.toString());
- } else if (state == (IN_KEYWORD)) {
- configuration.addKeyword(characters.toString());
- } else if (state == (IN_PLATFORM)) {
- configuration.addPlatform(characters.toString());
- } else if (state == (IN_OP_SYS)) {
- configuration.addOS(characters.toString());
- } else if (state == (IN_PRIORITY)) {
- configuration.addPriority(characters.toString());
- } else if (state == (IN_SEVERITY)) {
- configuration.addSeverity(characters.toString());
- } else if (state == (IN_CUSTOM_OPTION)) {
- // Option for CutstomFields
- if (currentCustomOptionName != null) {
- if (characters.length() > 0) {
- List<String> customOptionList = customOption.get(currentCustomOptionName);
- if (customOptionList == null) {
- customOptionList = new ArrayList<String>();
- customOption.put(currentCustomOptionName, customOptionList);
- }
- customOptionList.add(characters.toString());
- }
- }
- }
- } else if (localName.equals(ELEMENT_PLATFORM)) {
- state = state & ~IN_PLATFORM;
- } else if (localName.equals(ELEMENT_OP_SYS)) {
- state = state & ~IN_OP_SYS;
- } else if (localName.equals(ELEMENT_PRIORITY)) {
- state = state & ~IN_PRIORITY;
- } else if (localName.equals(ELEMENT_SEVERITY)) {
- state = state & ~IN_SEVERITY;
- } else if (localName.equals(ELEMENT_PRODUCTS)) {
- state = state & ~IN_PRODUCTS;
- } else if (localName.equals(ELEMENT_OP_SYS)) {
- state = state & ~IN_OP_SYS;
- } else if (localName.equals(ELEMENT_NAME)) {
- state = state & ~IN_NAME;
- if (state == (IN_PRODUCTS | IN_LI)) {
- // PRODUCT NAME
- currentProduct = characters.toString();
- configuration.addProduct(currentProduct);
- } else if (state == (IN_VERSIONS | IN_LI | IN_VERSION)) {
- // VERSION NAME
- if (about != null && !versionNames.containsValue(about)) {
- if (characters.length() > 0) {
- versionNames.put(about, characters.toString());
- }
- }
- } else if (state == (IN_COMPONENTS | IN_LI | IN_COMPONENT)) {
- // COMPONENT NAME
- currentComponent = characters.toString();
- if (about != null && !componentNames.containsValue(about)) {
- if (currentComponent.length() > 0) {
- componentNames.put(about, currentComponent);
- }
- }
- } else if (state == (IN_TARGET_MILESTONES | IN_LI | IN_TARGET_MILESTONE)) {
- // MILESTONE NAME
- if (about != null && !milestoneNames.containsValue(about)) {
- if (characters.length() > 0) {
- milestoneNames.put(about, characters.toString());
- }
- }
- } else if (state == (IN_FIELDS | IN_LI | IN_FIELD) || state == (IN_FLAG_TYPES | IN_LI | IN_FLAG_TYPE)) {
- // FIELDS NAME
- currentName = characters.toString();
- }
- } else if (localName.equals(ELEMENT_COMPONENTS)) {
- state = state & ~IN_COMPONENTS;
- } else if (localName.equals(ELEMENT_COMPONENT)) {
- state = state & ~IN_COMPONENT;
- } else if (localName.equals(ELEMENT_VERSION)) {
- state = state & ~IN_VERSION;
- } else if (localName.equals(ELEMENT_VERSIONS)) {
- state = state & ~IN_VERSIONS;
- } else if (localName.equals(ELEMENT_INSTALL_VERSION)) {
- state = state & ~IN_INSTALL_VERSION;
- configuration.setInstallVersion(characters.toString());
- } else if (localName.equals(ELEMENT_DB_ENCODING)) {
- state = state & ~IN_DB_ENCODING;
- configuration.setEncoding(characters.toString());
- } else if (localName.equals(ELEMENT_TARGET_MILESTONE)) {
- state = state & ~IN_TARGET_MILESTONE;
- } else if (localName.equals(ELEMENT_TARGET_MILESTONES)) {
- state = state & ~IN_TARGET_MILESTONES;
- } else if (localName.equals(ELEMENT_STATUS_OPEN)) {
- state = state & ~IN_STATUS_OPEN;
- } else if (localName.equals(ELEMENT_RESOLUTION)) {
- state = state & ~IN_RESOLUTION;
- } else if (localName.equals(ELEMENT_KEYWORD)) {
- state = state & ~IN_KEYWORD;
- } else if (localName.equals(ELEMENT_FIELDS)) {
- state = state & ~IN_FIELDS;
- } else if (localName.equals(ELEMENT_FIELD)) {
- if (currentName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- BugzillaCustomField newField = new BugzillaCustomField(currentDescription, currentName, currentType,
- currentEnterBug);
- List<String> customOptionList = customOption.get(currentName);
- if (customOptionList != null && !customOptionList.isEmpty()) {
- newField.setOptions(customOptionList);
- }
- configuration.addCustomField(newField);
- }
- state = state & ~IN_FIELD;
- } else if (localName.equals(ELEMENT_DESCRIPTION)) {
- currentDescription = characters.toString();
- } else if (localName.equals(ELEMENT_TYPE)) {
- currentType = characters.toString();
- } else if (localName.equals(ELEMENT_ID)) {
- currentId = Integer.parseInt(characters.toString());
- } else if (localName.equals(ELEMENT_ENTER_BUG)) {
- currentEnterBug = characters.toString();
- } else if (localName.equals(ELEMENT_REQUESTABLE)) {
- currentRequestable = characters.toString();
- } else if (localName.equals(ELEMENT_SPECIFICALLY_REQUESTABLE)) {
- currentSpecifically_requestable = characters.toString();
- } else if (localName.equals(ELEMENT_MULTIPLICABLE)) {
- currentMultiplicable = characters.toString();
- } else if (localName.equals(ELEMENT_FLAG_TYPES)) {
- state = state & ~IN_FLAG_TYPES;
- } else if (localName.equals(ELEMENT_FLAG_TYPE)) {
- if (currentId != -1) {
- if (about != null && !flagIds.containsValue(about)) {
- flagIds.put(about, currentId);
- }
- BugzillaFlag newFlag = new BugzillaFlag(currentName, currentDescription, currentType,
- currentRequestable, currentSpecifically_requestable, currentMultiplicable, currentId);
- configuration.addFlag(newFlag);
- }
- state = state & ~IN_FLAG_TYPE;
- } else if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- state = state & ~IN_CUSTOM_OPTION;
- currentCustomOptionName = ""; //$NON-NLS-1$
- }
- }
-
- private void parseResource(Attributes attributes) {
-
- switch (state) {
- case IN_PRODUCTS | IN_LI | IN_COMPONENTS | IN_LI_LI:
- if (attributes != null) {
- String compURI = attributes.getValue(ATTRIBUTE_RESOURCE);
- if (compURI != null && currentProduct.length() > 0) {
- List<String> compURIs = components.get(currentProduct);
- if (compURIs == null) {
- compURIs = new ArrayList<String>();
- components.put(currentProduct, compURIs);
- }
- compURIs.add(compURI);
- }
- }
- break;
- case IN_PRODUCTS | IN_LI | IN_VERSIONS | IN_LI_LI:
- if (attributes != null) {
- String resourceURI = attributes.getValue(ATTRIBUTE_RESOURCE);
- if (resourceURI != null && currentProduct.length() > 0) {
- List<String> versionUris = versions.get(currentProduct);
- if (versionUris == null) {
- versionUris = new ArrayList<String>();
- versions.put(currentProduct, versionUris);
- }
- versionUris.add(resourceURI);
- }
- }
- break;
- case IN_PRODUCTS | IN_LI | IN_TARGET_MILESTONES | IN_LI_LI:
- if (attributes != null) {
- String resourceURI = attributes.getValue(ATTRIBUTE_RESOURCE);
- if (resourceURI != null) {
- List<String> milestoneUris = milestones.get(currentProduct);
- if (milestoneUris == null) {
- milestoneUris = new ArrayList<String>();
- milestones.put(currentProduct, milestoneUris);
- }
- milestoneUris.add(resourceURI);
- }
- }
- break;
- case IN_COMPONENTS | IN_LI | IN_COMPONENT | IN_FLAG_TYPES | IN_LI_LI:
- if (attributes != null) {
- String compURI = attributes.getValue(ATTRIBUTE_RESOURCE);
- if (compURI != null && currentComponent.length() > 0 && currentProduct.length() > 0
- && compURI.length() > 0) {
-
- Map<String, List<String>> flagComponentList = flagsInComponent.get(currentProduct);
- if (flagComponentList == null) {
- flagComponentList = new HashMap<String, List<String>>();
- flagsInComponent.put(currentProduct, flagComponentList);
- }
- List<String> flagsForComponent = flagComponentList.get(currentComponent);
- if (flagsForComponent == null) {
- flagsForComponent = new ArrayList<String>();
- flagComponentList.put(currentComponent, flagsForComponent);
- }
- flagsForComponent.add(compURI.replace("flags.cgi?id=", "flag.cgi?id=")); //$NON-NLS-1$ //$NON-NLS-2$
- int i = 0;
- i++;
- }
- }
- break;
- case IN_COMPONENTS | IN_LI | IN_COMPONENT:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- int idx = about.indexOf("&product="); //$NON-NLS-1$
- if (idx != -1) {
- currentProduct = about.substring(idx + 9);
- }
- }
- break;
- case IN_VERSIONS | IN_LI | IN_VERSION:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- }
- break;
-
- case IN_TARGET_MILESTONES | IN_LI | IN_TARGET_MILESTONE:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- }
- break;
- case IN_FIELDS | IN_LI | IN_FIELD:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- }
- break;
- case IN_FLAG_TYPES | IN_LI | IN_FLAG_TYPE:
- if (attributes != null) {
- about = attributes.getValue(ATTRIBUTE_RDF_ABOUT);
- }
- break;
-
- }
- }
-
- @Override
- public void endDocument() throws SAXException {
-
- for (String product : components.keySet()) {
- List<String> componentURIs = components.get(product);
- for (String uri : componentURIs) {
- String realName = componentNames.get(uri);
- if (realName != null) {
- configuration.addComponent(product, realName);
- }
- }
- }
-
- for (String product : versions.keySet()) {
- List<String> versionURIs = versions.get(product);
- for (String uri : versionURIs) {
- String realName = versionNames.get(uri);
- if (realName != null) {
- configuration.addVersion(product, realName);
- }
- }
-
- }
-
- for (String product : milestones.keySet()) {
- List<String> milestoneURIs = milestones.get(product);
- for (String uri : milestoneURIs) {
- String realName = milestoneNames.get(uri);
- if (realName != null) {
- configuration.addTargetMilestone(product, realName);
- }
- }
-
- }
-
- for (String flagProduct : flagsInComponent.keySet()) {
- Map<String, List<String>> flagComponentUsage = flagsInComponent.get(flagProduct);
- for (String flagusageList : flagComponentUsage.keySet()) {
- List<String> flagList = flagComponentUsage.get(flagusageList);
- for (String flagAbout : flagList) {
- Integer flagId = flagIds.get(flagAbout);
- BugzillaFlag flag = configuration.getFlagWithId(flagId);
- flag.addUsed(flagProduct, flagusageList);
- }
- }
- }
-
- super.endDocument();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
deleted file mode 100644
index a52bba58e..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/SaxMultiBugReportContentHandler.java
+++ /dev/null
@@ -1,662 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2009 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.bugzilla.core;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
-import org.eclipse.mylyn.tasks.core.data.TaskAttachmentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
-import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskCommentMapper;
-import org.eclipse.mylyn.tasks.core.data.TaskData;
-import org.eclipse.mylyn.tasks.core.data.TaskDataCollector;
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-/**
- * Parser for xml bugzilla reports.
- *
- * @author Rob Elves
- * @author Hiroyuki Inaba (internationalization)
- */
-public class SaxMultiBugReportContentHandler extends DefaultHandler {
-
- private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
-
- private static final String ID_STRING_BEGIN = " (id="; //$NON-NLS-1$
-
- private static final String ID_STRING_END = ")"; //$NON-NLS-1$
-
- private StringBuffer characters;
-
- private TaskComment taskComment;
-
- private Map<String, TaskCommentMapper> attachIdToComment = new HashMap<String, TaskCommentMapper>();
-
- private int commentNum = 0;
-
- private BugzillaAttachmentMapper attachment;
-
- private final Map<String, TaskData> taskDataMap;
-
- private TaskData repositoryTaskData;
-
- private List<TaskComment> longDescs;
-
- private String errorMessage = null;
-
- private final List<BugzillaCustomField> customFields;
-
- private final TaskDataCollector collector;
-
- private boolean isDeprecated = false;
-
- private boolean isPatch = false;
-
- private String token;
-
- private TaskAttribute attachmentAttribute;
-
- public SaxMultiBugReportContentHandler(TaskAttributeMapper mapper, TaskDataCollector collector,
- Map<String, TaskData> taskDataMap, List<BugzillaCustomField> customFields) {
- this.taskDataMap = taskDataMap;
- this.customFields = customFields;
- this.collector = collector;
- }
-
- public boolean errorOccurred() {
- return errorMessage != null;
- }
-
- public String getErrorMessage() {
- return errorMessage;
- }
-
- @Override
- public void characters(char[] ch, int start, int length) throws SAXException {
- characters.append(ch, start, length);
- //System.err.println(String.copyValueOf(ch, start, length));
- }
-
- @Override
- public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
- characters = new StringBuffer();
- BugzillaAttribute tag = BugzillaAttribute.UNKNOWN;
- if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- return;
- }
- try {
- tag = BugzillaAttribute.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return;
- }
- throw e;
- }
- switch (tag) {
- case BUGZILLA:
- // Note: here we can get the bugzilla version if necessary
- break;
- case BUG:
- if (attributes != null && (attributes.getValue("error") != null)) { //$NON-NLS-1$
- errorMessage = attributes.getValue("error"); //$NON-NLS-1$
- }
- attachIdToComment = new HashMap<String, TaskCommentMapper>();
- commentNum = 0;
- taskComment = null;
- longDescs = new ArrayList<TaskComment>();
- token = null;
- break;
- case LONG_DESC:
- taskComment = new TaskComment(commentNum++);
- break;
- case WHO:
- if (taskComment != null) {
- if (attributes != null && attributes.getLength() > 0) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- if (name != null) {
- taskComment.authorName = name;
- }
- }
- }
- break;
- case REPORTER:
- if (attributes != null && attributes.getLength() > 0) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- if (name != null) {
- BugzillaTaskDataHandler.createAttribute(repositoryTaskData, BugzillaAttribute.REPORTER_NAME)
- .setValue(name);
- }
- }
- break;
- case QA_CONTACT:
- if (attributes != null && attributes.getLength() > 0) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- if (name != null) {
- BugzillaTaskDataHandler.createAttribute(repositoryTaskData, BugzillaAttribute.QA_CONTACT_NAME)
- .setValue(name);
- }
- }
- break;
- case ASSIGNED_TO:
- if (attributes != null && attributes.getLength() > 0) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- if (name != null) {
- BugzillaTaskDataHandler.createAttribute(repositoryTaskData, BugzillaAttribute.ASSIGNED_TO_NAME)
- .setValue(name);
- }
- }
- break;
- case ATTACHMENT:
- if (attributes != null) {
- isDeprecated = "1".equals(attributes.getValue(BugzillaAttribute.IS_OBSOLETE.getKey())); //$NON-NLS-1$
- isPatch = "1".equals(attributes.getValue(BugzillaAttribute.IS_PATCH.getKey())); //$NON-NLS-1$
- }
- break;
- case FLAG:
- if (attributes != null && attributes.getLength() > 0) {
- String name = attributes.getValue(ATTRIBUTE_NAME);
- if (name != null) {
- BugzillaFlagMapper mapper = new BugzillaFlagMapper();
- String requestee = attributes.getValue("requestee"); //$NON-NLS-1$
- mapper.setRequestee(requestee);
- String setter = attributes.getValue("setter"); //$NON-NLS-1$
- mapper.setSetter(setter);
- String status = attributes.getValue("status"); //$NON-NLS-1$
- mapper.setState(status);
- mapper.setFlagId(name);
- String id = attributes.getValue("id"); //$NON-NLS-1$
- if (id != null && !id.equals("")) { //$NON-NLS-1$
- /*
- * for version 3.2rc1 and 3.2.rc2 the id was not defined so we ignore
- * the definition
- */
- try {
- mapper.setNumber(Integer.valueOf(id));
- TaskAttribute attribute;
- if (attachmentAttribute != null) {
- attribute = attachmentAttribute.createAttribute("task.common.kind.flag" + id); //$NON-NLS-1$
- } else {
- attribute = repositoryTaskData.getRoot().createAttribute("task.common.kind.flag" + id); //$NON-NLS-1$
- }
- mapper.applyTo(attribute);
- } catch (NumberFormatException e) {
- // ignore
- }
- }
- }
- }
- break;
- }
-
- }
-
- @Override
- public void endElement(String uri, String localName, String qName) throws SAXException {
-
- //remove whitespaces from the end of the parsed Text
- while (characters.length() > 0 && Character.isWhitespace(characters.charAt(characters.length() - 1))) {
- characters.setLength(characters.length() - 1);
- }
-
- String parsedText = characters.toString();
-
- if (localName.startsWith(BugzillaCustomField.CUSTOM_FIELD_PREFIX)) {
- TaskAttribute endAttribute = repositoryTaskData.getRoot().getAttribute(localName);
- if (endAttribute == null) {
- String desc = "???"; //$NON-NLS-1$
- BugzillaCustomField customField = null;
- for (BugzillaCustomField bugzillaCustomField : customFields) {
- if (localName.equals(bugzillaCustomField.getName())) {
- customField = bugzillaCustomField;
- break;
- }
- }
- if (customField != null) {
- TaskAttribute atr = repositoryTaskData.getRoot().createAttribute(localName);
- desc = customField.getDescription();
- atr.getMetaData().defaults().setLabel(desc).setReadOnly(false);
- atr.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
- atr.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- switch (customField.getFieldType()) {
- case FreeText:
- atr.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- break;
- case DropDown:
- atr.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- break;
- case MultipleSelection:
- atr.getMetaData().setType(TaskAttribute.TYPE_MULTI_SELECT);
- break;
- case LargeText:
- atr.getMetaData().setType(TaskAttribute.TYPE_LONG_TEXT);
- break;
- case DateTime:
- atr.getMetaData().setType(TaskAttribute.TYPE_DATETIME);
- break;
-
- default:
- List<String> options = customField.getOptions();
- if (options.size() > 0) {
- atr.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- } else {
- atr.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- atr.getMetaData().setReadOnly(false);
- atr.setValue(parsedText);
- }
- } else {
- endAttribute.addValue(parsedText);
- }
- }
-
- BugzillaAttribute tag = BugzillaAttribute.UNKNOWN;
- try {
- tag = BugzillaAttribute.valueOf(localName.trim().toUpperCase(Locale.ENGLISH));
- } catch (RuntimeException e) {
- if (e instanceof IllegalArgumentException) {
- // ignore unrecognized tags
- return;
- }
- throw e;
- }
- switch (tag) {
- case BUG_ID: {
- try {
- repositoryTaskData = taskDataMap.get(parsedText.trim());
- if (repositoryTaskData == null) {
- errorMessage = parsedText + Messages.SaxMultiBugReportContentHandler_id_not_found;
- }
- } catch (Exception e) {
- errorMessage = Messages.SaxMultiBugReportContentHandler_Bug_id_from_server_did_not_match_requested_id;
- }
-
- TaskAttribute attr = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey());
- if (attr == null) {
- attr = BugzillaTaskDataHandler.createAttribute(repositoryTaskData, tag);
- }
- attr.setValue(parsedText);
-
- break;
- }
-
- // Comment attributes
- case WHO:
- if (taskComment != null) {
- taskComment.author = parsedText;
- }
- break;
- case BUG_WHEN:
- if (taskComment != null) {
- taskComment.createdTimeStamp = parsedText;
- }
- break;
- case WORK_TIME:
- if (taskComment != null) {
- taskComment.timeWorked = parsedText;
- }
- break;
- case THETEXT:
- if (taskComment != null) {
- taskComment.commentText = parsedText;
- }
- break;
- case LONG_DESC:
- if (taskComment != null) {
- longDescs.add(taskComment);
- }
- break;
-
- // Attachment attributes
- case ATTACHID:
- attachmentAttribute = repositoryTaskData.getRoot().createAttribute(
- TaskAttribute.PREFIX_ATTACHMENT + parsedText);
- attachment = BugzillaAttachmentMapper.createFrom(attachmentAttribute);
- attachment.setLength(new Long(-1));
- attachment.setAttachmentId(parsedText);
- attachment.setPatch(isPatch);
- attachment.setDeprecated(isDeprecated);
- attachment.setToken(null);
- break;
- case DATE:
- // ignore
- break;
- case DESC:
- if (attachment != null) {
- attachment.setDescription(parsedText);
- }
- break;
- case FILENAME:
- if (attachment != null) {
- attachment.setFileName(parsedText);
- }
- break;
- case CTYPE:
- case TYPE:
- if (attachment != null) {
- attachment.setContentType(parsedText);
- }
- break;
- case SIZE:
- if (attachment != null) {
- try {
- if (parsedText != null) {
- attachment.setLength(Long.parseLong(parsedText));
- }
- } catch (NumberFormatException e) {
- // ignore
- }
- }
- break;
- case ATTACHMENT:
- if (attachment != null) {
- attachment.applyTo(attachmentAttribute);
- }
- isPatch = false;
- isDeprecated = false;
- attachment = null;
- attachmentAttribute = null;
- break;
- case DATA:
- // ignored
- break;
- case BUGZILLA:
- // ignored
- break;
- case BUG:
- // Reached end of bug.
-
- addDescriptionAndComments();
-
- // Need to set LONGDESCLENGTH to number of comments + 1 for description
- TaskAttribute numCommentsAttribute = repositoryTaskData.getRoot().getMappedAttribute(
- BugzillaAttribute.LONGDESCLENGTH.getKey());
- if (numCommentsAttribute == null) {
- numCommentsAttribute = BugzillaTaskDataHandler.createAttribute(repositoryTaskData,
- BugzillaAttribute.LONGDESCLENGTH);
- }
-
- numCommentsAttribute.setValue("" + commentNum); //$NON-NLS-1$
-
- updateAttachmentMetaData();
- TaskAttribute attrCreation = repositoryTaskData.getRoot().getAttribute(
- BugzillaAttribute.CREATION_TS.getKey());
-
- updateCustomFields(repositoryTaskData);
-
- if (token != null) {
- TaskAttribute tokenAttribute = BugzillaTaskDataHandler.createAttribute(repositoryTaskData,
- BugzillaAttribute.TOKEN);
- tokenAttribute.setValue(token);
- }
-
- // Work around (bug#285796) If planning enabled (ESTIMATE_TIME attr present) create DEADLINE attr since it should be present.
- TaskAttribute estimatedTimeAttr = repositoryTaskData.getRoot().getMappedAttribute(
- BugzillaAttribute.ESTIMATED_TIME.getKey());
- TaskAttribute deadlineAttr = repositoryTaskData.getRoot().getMappedAttribute(
- BugzillaAttribute.DEADLINE.getKey());
- if (estimatedTimeAttr != null && deadlineAttr == null) {
- BugzillaTaskDataHandler.createAttribute(repositoryTaskData, BugzillaAttribute.DEADLINE);
- }
-
- // Save/Add to collector. Guard against empty data sets
- if (attrCreation != null && !attrCreation.equals("")) { //$NON-NLS-1$
- collector.accept(repositoryTaskData);
- }
- break;
- case BLOCKED:
- // handled similarly to DEPENDSON
- case DEPENDSON:
- TaskAttribute blockOrDepends = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey());
- if (blockOrDepends == null) {
- BugzillaTaskDataHandler.createAttribute(repositoryTaskData, tag).setValue(parsedText);
- } else {
- if (blockOrDepends.getValue().equals("")) { //$NON-NLS-1$
- blockOrDepends.setValue(parsedText);
- } else {
- blockOrDepends.setValue(blockOrDepends.getValue() + ", " + parsedText); //$NON-NLS-1$
- }
- }
- break;
- case UNKNOWN:
- //ignore
- break;
- case FLAG:
- //ignore
- break;
- case TOKEN:
- if (attachment != null) {
- attachment.setToken(parsedText);
- } else {
- token = parsedText;
- }
- break;
- default:
- TaskAttribute defaultAttribute = repositoryTaskData.getRoot().getMappedAttribute(tag.getKey());
- if (defaultAttribute == null) {
- defaultAttribute = BugzillaTaskDataHandler.createAttribute(repositoryTaskData, tag);
- defaultAttribute.setValue(parsedText);
- } else {
- defaultAttribute.addValue(parsedText);
- }
- break;
- }
-
- }
-
- private void updateCustomFields(TaskData taskData) {
- RepositoryConfiguration config = BugzillaCorePlugin.getRepositoryConfiguration(repositoryTaskData.getRepositoryUrl());
- if (config != null) {
- for (BugzillaCustomField bugzillaCustomField : config.getCustomFields()) {
-
- TaskAttribute atr = taskData.getRoot().getAttribute(bugzillaCustomField.getName());
- if (atr == null) {
- atr = taskData.getRoot().createAttribute(bugzillaCustomField.getName());
- }
-
- if (atr != null) {
- atr.getMetaData().defaults().setLabel(bugzillaCustomField.getDescription());
- atr.getMetaData().setKind(TaskAttribute.KIND_DEFAULT);
-
- switch (bugzillaCustomField.getFieldType()) {
- case FreeText:
- atr.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- break;
- case DropDown:
- atr.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- break;
- case MultipleSelection:
- atr.getMetaData().setType(TaskAttribute.TYPE_MULTI_SELECT);
- break;
- case LargeText:
- atr.getMetaData().setType(TaskAttribute.TYPE_LONG_TEXT);
- break;
- case DateTime:
- atr.getMetaData().setType(TaskAttribute.TYPE_DATETIME);
- break;
-
- default:
- List<String> options = bugzillaCustomField.getOptions();
- if (options.size() > 0) {
- atr.getMetaData().setType(TaskAttribute.TYPE_SINGLE_SELECT);
- } else {
- atr.getMetaData().setType(TaskAttribute.TYPE_SHORT_TEXT);
- }
- }
- atr.getMetaData().setReadOnly(false);
- }
- }
- }
-
- }
-
- private void updateAttachmentMetaData() {
- List<TaskAttribute> taskAttachments = repositoryTaskData.getAttributeMapper().getAttributesByType(
- repositoryTaskData, TaskAttribute.TYPE_ATTACHMENT);
- for (TaskAttribute attachment : taskAttachments) {
- TaskAttachmentMapper attachmentMapper = TaskAttachmentMapper.createFrom(attachment);
- TaskCommentMapper taskComment = attachIdToComment.get(attachmentMapper.getAttachmentId());
- if (taskComment != null) {
- attachmentMapper.setAuthor(taskComment.getAuthor());
- attachmentMapper.setCreationDate(taskComment.getCreationDate());
- }
- attachmentMapper.setUrl(repositoryTaskData.getRepositoryUrl()
- + IBugzillaConstants.URL_GET_ATTACHMENT_SUFFIX + attachmentMapper.getAttachmentId());
- attachmentMapper.applyTo(attachment);
- }
- }
-
- private void addDescriptionAndComments() {
- int longDescsSize = longDescs.size() - 1;
- commentNum = 1;
- if (longDescsSize == 0) {
- addDescription(longDescs.get(0).commentText);
- } else if (longDescsSize == 1) {
- if (longDescs.get(0).createdTimeStamp.compareTo(longDescs.get(1).createdTimeStamp) <= 0) {
- // if created_0 is equal to created_1 we assume that longDescs at index 0 is the description.
- addDescription(longDescs.get(0).commentText);
- addComment(longDescs.get(1));
- } else {
- addDescription(longDescs.get(1).commentText);
- addComment(longDescs.get(0));
- }
- } else if (longDescsSize > 1) {
- String created_0 = longDescs.get(0).createdTimeStamp;
- String created_1 = longDescs.get(1).createdTimeStamp;
- String created_n = longDescs.get(longDescsSize).createdTimeStamp;
- if (created_0.compareTo(created_1) <= 0 && created_0.compareTo(created_n) < 0) {
- // if created_0 is equal to created_1 we assume that longDescs at index 0 is the description.
- addDescription(longDescs.get(0).commentText);
-
- if (created_1.compareTo(created_n) < 0) {
- for (int i = 1; i <= longDescsSize; i++) {
- addComment(longDescs.get(i));
- }
- } else {
- for (int i = longDescsSize; i > 0; i--) {
- addComment(longDescs.get(i));
- }
- }
- } else {
- addDescription(longDescs.get(longDescsSize).commentText);
- if (created_0.compareTo(created_1) < 0) {
- for (int i = 0; i < longDescsSize; i++) {
- addComment(longDescs.get(i));
- }
- } else {
- for (int i = longDescsSize - 1; i >= 0; i--) {
- addComment(longDescs.get(i));
- }
- }
- }
- }
- }
-
- private void addDescription(String commentText) {
- TaskAttribute attrDescription = BugzillaTaskDataHandler.createAttribute(repositoryTaskData,
- BugzillaAttribute.LONG_DESC);
- attrDescription.setValue(commentText);
- }
-
- private void addComment(TaskComment comment) {
- TaskAttribute attribute = repositoryTaskData.getRoot().createAttribute(
- TaskAttribute.PREFIX_COMMENT + commentNum);
- TaskCommentMapper taskComment = TaskCommentMapper.createFrom(attribute);
- taskComment.setCommentId(commentNum + ""); //$NON-NLS-1$
- taskComment.setNumber(commentNum);
- IRepositoryPerson author = repositoryTaskData.getAttributeMapper().getTaskRepository().createPerson(
- comment.author);
- author.setName(comment.authorName);
- taskComment.setAuthor(author);
- TaskAttribute attrTimestamp = attribute.createAttribute(BugzillaAttribute.BUG_WHEN.getKey());
- attrTimestamp.setValue(comment.createdTimeStamp);
- taskComment.setCreationDate(repositoryTaskData.getAttributeMapper().getDateValue(attrTimestamp));
- if (comment.commentText != null) {
- String commentText = comment.commentText.trim();
- taskComment.setText(commentText);
-
- }
- taskComment.applyTo(attribute);
- commentNum++;
-
- if (comment.timeWorked != null) {
- TaskAttribute workTime = BugzillaTaskDataHandler.createAttribute(attribute, BugzillaAttribute.WORK_TIME);
- workTime.setValue(comment.timeWorked);
- }
-
- parseAttachment(taskComment);
-
- }
-
- /** determines attachment id from comment */
- private void parseAttachment(TaskCommentMapper comment) {
- String attachmentID = ""; //$NON-NLS-1$
- String commentText = comment.getText();
- int firstDelimiter = commentText.indexOf("\n"); //$NON-NLS-1$
- if (firstDelimiter < 0) {
- firstDelimiter = commentText.length();
- }
- int startIndex = commentText.indexOf(ID_STRING_BEGIN);
- if (startIndex > 0 && startIndex < firstDelimiter) {
- int endIndex = commentText.indexOf(ID_STRING_END, startIndex);
- if (endIndex > 0 && endIndex < firstDelimiter) {
- startIndex += ID_STRING_BEGIN.length();
- int p = startIndex;
- while (p < endIndex) {
- char c = commentText.charAt(p);
- if (c < '0' || c > '9') {
- break;
- }
- p++;
- }
- if (p == endIndex) {
- attachmentID = commentText.substring(startIndex, endIndex);
- if (!attachmentID.equals("")) { //$NON-NLS-1$
- attachIdToComment.put(attachmentID, comment);
- }
- }
- }
- }
- }
-
- private static class TaskComment {
-
- public int number;
-
- public String author;
-
- public String authorName;
-
- public String createdTimeStamp;
-
- public String commentText;
-
- public String timeWorked;
-
- public boolean hasAttachment;
-
- public String attachmentId;
-
- public TaskComment(int num) {
- this.number = num;
- }
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java
deleted file mode 100644
index 089eaeb49..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/UnrecognizedReponseException.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.IOException;
-
-/**
- * @author Rob Elves
- */
-public class UnrecognizedReponseException extends IOException {
-
- private static final long serialVersionUID = 3937060773477757464L;
-
- public UnrecognizedReponseException(String message) {
- super(message);
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
deleted file mode 100644
index e68d290f2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/XmlCleaner.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.Reader;
-import java.text.ParseException;
-
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer;
-import org.eclipse.mylyn.commons.net.HtmlTag;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token;
-
-/**
- * This is in place to escape & characters within the resource and rdf:about attributes. Currently the values are not
- * escaped which causes sax parser errors. This bug has been filed and can be found here:
- * https://bugzilla.mozilla.org/show_bug.cgi?id=264785
- *
- * @author Rob Elves
- */
-public class XmlCleaner {
-
- public static BufferedReader clean(Reader in, File tempFile) {
-
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(in, null);
- try {
- BufferedWriter content = new BufferedWriter(new FileWriter(tempFile));
- // Hack since HtmlStreamTokenizer not familiar with xml tag.
- content.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
-
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- if (tag.getAttribute("resource") != null) { //$NON-NLS-1$
- String resourceID = tag.getAttribute("resource"); //$NON-NLS-1$
- tag.setAttribute("resource", resourceID.replace("&", "&amp;")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- if (tag.getAttribute("rdf:about") != null) { //$NON-NLS-1$
- String resourceID = tag.getAttribute("rdf:about"); //$NON-NLS-1$
- tag.setAttribute("rdf:about", resourceID.replace("&", "&amp;")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
- }
- if (!token.toString().startsWith("<?xml")) { //$NON-NLS-1$
- content.append(token.toString());
- }
- }
- content.flush();
- content.close();
- return new BufferedReader(new FileReader(tempFile));
- } catch (IOException e) {
-
- } catch (ParseException e) {
-
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
deleted file mode 100644
index cd4ea3d32..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AssignmentEvent.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-public class AssignmentEvent extends TaskRevision {
-
- private static final long serialVersionUID = 3258693199936631348L;
-
- private final String assigned;
-
- public AssignmentEvent(String change) {
- this.what = TaskRevision.ASSIGNMENT;
- this.assigned = change;
- this.added = change;
- }
-
- public String getAssigned() {
- return this.assigned;
- }
-
- @Override
- public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- + this.getAssigned();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
deleted file mode 100644
index 39c790872..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentEvent.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author John Anvik
- */
-public class AttachmentEvent extends TaskRevision {
-
- private static final long serialVersionUID = 3258693199936631348L;
-
- private static final Pattern id = Pattern.compile("\\d+"); //$NON-NLS-1$
-
- private final int attachmentId;
-
- private final List<AttachmentFlag> flags;
-
- public AttachmentEvent(int id, List<AttachmentFlag> flags) {
- this.what = TaskRevision.ATTACHMENT;
- this.attachmentId = id;
- this.flags = flags;
- }
-
- public String getFlagsString() {
- String flagString = ""; //$NON-NLS-1$
- for (AttachmentFlag flag : this.flags) {
- flagString += flag + " "; //$NON-NLS-1$
- }
- return flagString;
- }
-
- public static int parseId(String attachment) {
- Matcher matcher = AttachmentEvent.id.matcher(attachment);
- if (matcher.find()) {
- return Integer.parseInt(matcher.group());
- }
-
- // Error situation
- System.err.println("WARNING: Cannot find attachment id in " + attachment); //$NON-NLS-1$
- return -1;
- }
-
- public static List<AttachmentFlag> parseFlags(String attachmentFlags) {
- List<AttachmentFlag> flags = new ArrayList<AttachmentFlag>();
- AttachmentFlagStatus flagStatus = AttachmentFlagStatus.UNKNOWN;
- AttachmentFlagState flagState = AttachmentFlagState.UNKNOWN;
-
- String[] flagToken = attachmentFlags.split(", "); //$NON-NLS-1$
- for (String token : flagToken) {
- if (token.indexOf("(") != -1) { //$NON-NLS-1$
- int end = token.indexOf("("); //$NON-NLS-1$
- String substr = token.substring(0, end);
- token = substr;
- }
-
- /* Handle the case of the obsolete status 'needs-work' */
- if (token.startsWith("needs-work")) { //$NON-NLS-1$
- /*
- * Since we don't know if 'needs-work' applies to 'review' or
- * 'superreview', deny both
- */
- flags.add(new AttachmentFlag(AttachmentFlagStatus.REVIEW, AttachmentFlagState.DENIED));
- flags.add(new AttachmentFlag(AttachmentFlagStatus.SUPERREVIEW, AttachmentFlagState.DENIED));
- } else {
- boolean startsWithReview = token.toLowerCase().startsWith(
- AttachmentFlagStatus.REVIEW.name().toLowerCase());
- boolean firstOrSecondReview = token.toLowerCase().contains(
- AttachmentFlagStatus.REVIEW.name().toLowerCase())
- && (token.toLowerCase().startsWith("first-") || token.toLowerCase().startsWith("second-")); //$NON-NLS-1$ //$NON-NLS-2$
- /*
- * if(firstOrSecondReview){ System.err.println("First/second
- * activated"); }
- */
- if (startsWithReview || firstOrSecondReview) {
- flagStatus = AttachmentFlagStatus.REVIEW;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.SUPERREVIEW.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.SUPERREVIEW;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.APPROVAL.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.APPROVAL;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.UI.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.UI;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.BRANCH.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.BRANCH;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.COMMITTED.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.COMMITTED;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.ACCEPTED.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.ACCEPTED;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.COMMENTED.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.COMMENTED;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.NONE.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.NONE;
- } else if (token.toLowerCase().startsWith(AttachmentFlagStatus.REJECTED.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.REJECTED;
- } else if (token.equals("1") //$NON-NLS-1$
- || token.toLowerCase().startsWith(AttachmentFlagStatus.OBSOLETE.name().toLowerCase())) {
- flagStatus = AttachmentFlagStatus.OBSOLETE;
- }
-
- // Assure that flag was set to something meaningful
- if (flagStatus.equals(AttachmentFlagStatus.UNKNOWN) && token.equals("") == false) { //$NON-NLS-1$
- System.err.println("WARNING: Attachment flag status unknown: " + token); //$NON-NLS-1$
- }
-
- if (token.length() > 0) {
- if (token.charAt(token.length() - 1) == '?') {
- flagState = AttachmentFlagState.REQUESTED;
- } else if (token.charAt(token.length() - 1) == '+') {
- flagState = AttachmentFlagState.GRANTED;
- } else if (token.charAt(token.length() - 1) == '-') {
- flagState = AttachmentFlagState.DENIED;
- } else if (flagStatus.equals(AttachmentFlagStatus.OBSOLETE)
- || flagStatus.equals(AttachmentFlagStatus.COMMITTED)
- || flagStatus.equals(AttachmentFlagStatus.ACCEPTED)
- || flagStatus.equals(AttachmentFlagStatus.COMMENTED)
- || flagStatus.equals(AttachmentFlagStatus.NONE)
- || flagStatus.equals(AttachmentFlagStatus.REJECTED)
- || flagStatus.equals(AttachmentFlagStatus.REVIEW)) {
- flagState = AttachmentFlagState.OFF;
- }
- }
- // Assure that flag state was set to something meaningful
- if (flagState.equals(AttachmentFlagState.UNKNOWN) && token.equals("") == false) { //$NON-NLS-1$
- System.err.println("WARNING: Attachment flag state unknown: " + token); //$NON-NLS-1$
- }
-
- flags.add(new AttachmentFlag(flagStatus, flagState));
- }
- }
- return flags;
- }
-
- @Override
- public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.attachmentId + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- + this.getFlagsString();
- }
-
- public List<AttachmentFlag> getFlags() {
- return this.flags;
- }
-
- public int getAttachmentId() {
- return this.attachmentId;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
deleted file mode 100644
index 65a5fa52a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlag.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.io.Serializable;
-
-/**
- * @author John Anvik
- */
-public class AttachmentFlag implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- private final AttachmentFlagStatus status;
-
- private final AttachmentFlagState state;
-
- public AttachmentFlag(AttachmentFlagStatus status, AttachmentFlagState state) {
- this.status = status;
- this.state = state;
- }
-
- public AttachmentFlagState getState() {
- return this.state;
- }
-
- public AttachmentFlagStatus getStatus() {
- return this.status;
- }
-
- @Override
- public String toString() {
- return this.status.name() + "[" + (this.state.equals(AttachmentFlagState.UNKNOWN) ? "" : this.state.name()) //$NON-NLS-1$ //$NON-NLS-2$
- + "]"; //$NON-NLS-1$
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java
deleted file mode 100644
index 74dc75ebb..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagState.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-public enum AttachmentFlagState {
- OFF, GRANTED, DENIED, REQUESTED, UNKNOWN;
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java
deleted file mode 100644
index 7364d4c7f..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/AttachmentFlagStatus.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-public enum AttachmentFlagStatus {
- REVIEW /* Firefox */, SUPERREVIEW /* Firefox */, APPROVAL /* Firefox */, UI /* Firefox */, BRANCH /* Firefox */, OBSOLETE, UNKNOWN, COMMITTED /* Gnome */, ACCEPTED /* Gnome accepted-committ_now*/, COMMENTED /* Gnome */, NONE /* Gnome */, REJECTED/* Gnome */;
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
deleted file mode 100644
index 6c6e44c3c..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/BugzillaTaskHistoryParser.java
+++ /dev/null
@@ -1,236 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.text.ParseException;
-import java.util.Iterator;
-import java.util.Locale;
-
-import javax.security.auth.login.LoginException;
-import javax.swing.text.html.HTML.Tag;
-
-import org.apache.commons.lang.StringEscapeUtils;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer;
-import org.eclipse.mylyn.commons.net.HtmlTag;
-import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token;
-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaLanguageSettings;
-
-/**
- * Parses Bugzilla bug activity page to fill in a BugActivity object
- *
- * @author John Anvik
- */
-
-public class BugzillaTaskHistoryParser {
-
- private final InputStream inStream;
-
- private final String characterEncoding;
-
- public BugzillaTaskHistoryParser(InputStream inStream, String characterEncoding) {
- this.inStream = inStream;
- this.characterEncoding = characterEncoding;
- }
-
- /**
- * Parse the activity page for events
- *
- * @return A BugActivity object containing the activity history
- */
- public TaskHistory retrieveHistory(BugzillaLanguageSettings bugzillaLanguageSettings) throws IOException,
- ParseException, LoginException {
- TaskHistory activity = new TaskHistory();
- HtmlStreamTokenizer tokenizer = new HtmlStreamTokenizer(new BufferedReader(new InputStreamReader(inStream,
- characterEncoding)), null);
-
- boolean isTitle = false;
- boolean possibleBadLogin = false;
- String title = ""; //$NON-NLS-1$
-
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- // make sure that bugzilla doesn't want us to login
- if (token.getType() == Token.TAG && ((HtmlTag) (token.getValue())).getTagType() == Tag.TITLE
- && !((HtmlTag) (token.getValue())).isEndTag()) {
- isTitle = true;
- continue;
- }
-
- if (isTitle) {
- // get all of the data from inside of the title tag
- if (token.getType() != Token.TAG) {
- title += ((StringBuffer) token.getValue()).toString().toLowerCase() + " "; //$NON-NLS-1$
- continue;
- } else if (token.getType() == Token.TAG && ((HtmlTag) token.getValue()).getTagType() == Tag.TITLE
- && ((HtmlTag) token.getValue()).isEndTag()) {
- // check if we may have a problem with login by looking
- // at
- // the title of the page
- boolean found = false;
- for (Iterator<String> iterator = bugzillaLanguageSettings.getResponseForCommand(
- BugzillaLanguageSettings.COMMAND_BAD_LOGIN).iterator(); iterator.hasNext() && !found;) {
- String value = iterator.next().toLowerCase(Locale.ENGLISH);
- found = found || title.indexOf(value) != -1;
- }
- if (found) {
- possibleBadLogin = true;
- }
- isTitle = false;
- title = ""; //$NON-NLS-1$
- }
- continue;
- }
-
- if (token.getType() == Token.TAG) {
- HtmlTag tag = (HtmlTag) token.getValue();
- // Skip till find <br> - "there can be only one"
- if (tag.getTagType() == Tag.BR && !tag.isEndTag()) {
- // skip tags until start of real data
- while (true) {
- token = tokenizer.nextToken();
- if (token.getType() == Token.TAG) {
- tag = (HtmlTag) token.getValue();
- if ((tag.isEndTag() && tag.getTagType() == Tag.TR) || tag.getTagType() == Tag.P) {
- break;
- }
- }
- }
- parseActivity(tokenizer, activity);
- }
- }
- }
-
- // if we don't have any keywords and suspect that there was a login
- // problem, assume we had a login problem
- if (activity.size() == 0 && possibleBadLogin) {
- throw new LoginException("Bugzilla login information incorrect"); //$NON-NLS-1$
- }
- return activity;
- }
-
- /**
- * Parse the events that have happened to the bug
- *
- * @param tokenizer
- * the token stream
- * @param activity
- * the activity object to store the events in
- * @return
- */
- private void parseActivity(HtmlStreamTokenizer tokenizer, TaskHistory activity) throws IOException, ParseException {
- HtmlTag tag;
-
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- tag = (HtmlTag) token.getValue();
-
- // End of events
- if (tag.getTagType() == Tag.TABLE && tag.isEndTag()) {
- break;
- }
-
- // Get event entry
- this.parseEvent(tokenizer, activity);
- }
- }
- }
-
- /**
- * Parse an activity entry
- *
- * @param tokenizer
- * the stream of tokens
- * @param activity
- * the activity object to store events in
- */
- private void parseEvent(HtmlStreamTokenizer tokenizer, TaskHistory activity) {
-
- HtmlTag tag;
- int numChanges = 0;
-
- try {
- // Discover how many changes for this entry
- for (Token token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.TD && tag.hasAttribute("rowspan")) { //$NON-NLS-1$
- numChanges = tag.getIntAttribute("rowspan"); //$NON-NLS-1$
- break;
- }
- }
- }
- } catch (NumberFormatException e) {
- e.printStackTrace();
- } catch (IOException e) {
- e.printStackTrace();
- } catch (ParseException e) {
- e.printStackTrace();
- }
-
- String name = getData(tokenizer);
- String date = getData(tokenizer);
-
- String what, removed, added;
- TaskRevision event;
- for (int change = 0; change < numChanges; change++) {
- what = getData(tokenizer);
- removed = getData(tokenizer);
- added = getData(tokenizer);
-
- event = TaskRevision.createEvent(what, added);
- event.setName(name);
- event.setDate(date);
- event.setRemoved(removed);
-
- activity.addEvent(event);
- }
- }
-
- private String getData(HtmlStreamTokenizer tokenizer) {
-
- Token token;
- HtmlTag tag;
- StringBuffer sb = new StringBuffer();
-
- try {
- for (token = tokenizer.nextToken(); token.getType() != Token.EOF; token = tokenizer.nextToken()) {
- if (token.getType() == Token.TAG) {
- tag = (HtmlTag) token.getValue();
- if (tag.getTagType() == Tag.TD && tag.isEndTag()) {
- String data = StringEscapeUtils.unescapeHtml(sb.toString());
- if (data.startsWith("\n") && (data.contains("Attachment") == false)) { //$NON-NLS-1$ //$NON-NLS-2$
- data = ""; // empty field //$NON-NLS-1$
- }
- return data;
- }
- }
- if (token.getType() == Token.TEXT) {
- sb.append(token.toString());
- }
- }
- } catch (IOException e) {
- e.printStackTrace();
- } catch (ParseException e) {
- e.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
- return null;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java
deleted file mode 100644
index ba94cbc5d..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/Messages.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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.bugzilla.core.history;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.core.history.messages"; //$NON-NLS-1$
-
- static {
- // load message values from bundle file
- reloadMessages();
- }
-
- public static void reloadMessages() {
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- public static String ResolutionType_Unknown_resolution_type_X;
-
- public static String StatusType_Unknown_status_type_X;
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
deleted file mode 100644
index bc21d146a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionEvent.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-public class ResolutionEvent extends TaskRevision {
-
- private static final long serialVersionUID = 6609447743555687524L;
-
- private final ResolutionType type;
-
- public ResolutionEvent(ResolutionType type) {
- this.what = TaskRevision.RESOLUTION;
- this.type = type;
- }
-
- public ResolutionType getType() {
- return this.type;
- }
-
- public String getResolvedBy() {
- return this.getName();
- }
-
- @Override
- public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- + (this.getType().equals(ResolutionType.UNKNOWN) ? "" : this.getType()); //$NON-NLS-1$
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
deleted file mode 100644
index 33ff708ad..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/ResolutionType.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.text.MessageFormat;
-
-/**
- * @author John Anvik
- */
-public enum ResolutionType {
-
- FIXED, DUPLICATE, WONTFIX, INVALID, WORKSFORME, REOPENED, LATER, REMIND, MOVED, UNKNOWN, NOTABUG, NOTGNOME, INCOMPLETE, OBSOLETE, EXPIRED, NOTXIMIAN, NEXTRELEASE, ERRATA, RAWHIDE, UPSTREAM, CANTFIX, CURRENTRELEASE, INSUFFICIENT_DATA, DEFERRED;
-
- public static ResolutionType convert(String change) {
- if (change.equals("FIXED")) { //$NON-NLS-1$
- return ResolutionType.FIXED;
- }
- if (change.contains("DUPLICATE")) { //$NON-NLS-1$
- return ResolutionType.DUPLICATE;
- }
- if (change.equals("INVALID")) { //$NON-NLS-1$
- return ResolutionType.INVALID;
- }
- if (change.equals("LATER")) { //$NON-NLS-1$
- return ResolutionType.LATER;
- }
- if (change.equals("WORKSFORME")) { //$NON-NLS-1$
- return ResolutionType.WORKSFORME;
- }
- if (change.equals("REOPENED")) { //$NON-NLS-1$
- return ResolutionType.REOPENED;
- }
- if (change.equals("WONTFIX")) { //$NON-NLS-1$
- return ResolutionType.WONTFIX;
- }
- if (change.equals("REMIND")) { //$NON-NLS-1$
- return ResolutionType.REMIND;
- }
- if (change.equals("MOVED")) { //$NON-NLS-1$
- return ResolutionType.MOVED;
- }
- if (change.equals("EXPIRED")) { //$NON-NLS-1$
- return ResolutionType.EXPIRED;
- }
- if (change.equals("NOTABUG")) { // Gnome //$NON-NLS-1$
- return ResolutionType.NOTABUG;
- }
- if (change.equals("NOTGNOME")) { // Gnome //$NON-NLS-1$
- return ResolutionType.NOTGNOME;
- }
- if (change.equals("INCOMPLETE")) { // Gnome //$NON-NLS-1$
- return ResolutionType.INCOMPLETE;
- }
- if (change.equals("OBSOLETE")) { // Gnome //$NON-NLS-1$
- return ResolutionType.OBSOLETE;
- }
- if (change.equals("NOTXIMIAN")) { // Gnome //$NON-NLS-1$
- return ResolutionType.NOTXIMIAN;
- }
- if (change.equals("NEXTRELEASE")) { // Redhat //$NON-NLS-1$
- return ResolutionType.NEXTRELEASE;
- }
- if (change.equals("ERRATA")) {// Redhat //$NON-NLS-1$
- return ResolutionType.ERRATA;
- }
- if (change.equals("RAWHIDE")) {// Redhat //$NON-NLS-1$
- return ResolutionType.RAWHIDE;
- }
- if (change.equals("UPSTREAM")) {// Redhat //$NON-NLS-1$
- return ResolutionType.UPSTREAM;
- }
- if (change.equals("CANTFIX")) {// Redhat //$NON-NLS-1$
- return ResolutionType.CANTFIX;
- }
- if (change.equals("CURRENTRELEASE")) {// Redhat //$NON-NLS-1$
- return ResolutionType.CURRENTRELEASE;
- }
- if (change.equals("INSUFFICIENT_DATA")) {// Redhat //$NON-NLS-1$
- return ResolutionType.INSUFFICIENT_DATA;
- }
- if (change.equals("DEFERRED")) {// Redhat //$NON-NLS-1$
- return ResolutionType.DEFERRED;
- }
- if (change.equals("") == false) { //$NON-NLS-1$
- System.err.println(MessageFormat.format(Messages.ResolutionType_Unknown_resolution_type_X, change));
- }
- return ResolutionType.UNKNOWN;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
deleted file mode 100644
index 42090350a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusEvent.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-/**
- * @author John Anvik
- */
-public class StatusEvent extends TaskRevision {
-
- private static final long serialVersionUID = 245446279981920435L;
-
- private final StatusType type;
-
- public StatusEvent(StatusType type) {
- this.what = TaskRevision.STATUS;
- this.type = type;
- }
-
- public StatusType getType() {
- return this.type;
- }
-
- @Override
- public String toString() {
- return this.getName() + " | " + this.getDate() + " | " + this.getWhat() + " | " + this.getRemoved() + " | " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- + this.getType();
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
deleted file mode 100644
index 922e642e2..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/StatusType.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.text.MessageFormat;
-
-/**
- * @author John Anvik
- */
-public enum StatusType {
- VERIFIED, RESOLVED, CLOSED, REOPENED, ASSIGNED, NEW, UNCONFIRMED, NEEDINFO, /* ANT? */
- WAITING, /* GCC */
- SUSPENDED, /* GCC */
- MODIFIED, /* Redhat */
- POST, /* Redhat */
- INVESTIGATE, /* Redhat */
- PASSES_QA, /* Redhat */
- PROD_READY, /* Redhat */
- RELEASE_PENDING, /* Redhat */
- ON_QA, /* Redhat */
- QA_READY, /* Redhat */
- FAILS_QA, /* Redhat */
- SPEC, /* Redhat */
- UNKNOWN;
-
- public static StatusType convert(String change) {
- if (change.equals("RESOLVED")) { //$NON-NLS-1$
- return RESOLVED;
- }
- if (change.equals("ASSIGNED")) { //$NON-NLS-1$
- return ASSIGNED;
- }
- if (change.equals("NEW")) { //$NON-NLS-1$
- return NEW;
- }
- if (change.equals("REOPENED")) { //$NON-NLS-1$
- return REOPENED;
- }
- if (change.equals("CLOSED")) { //$NON-NLS-1$
- return CLOSED;
- }
- if (change.equals("VERIFIED")) { //$NON-NLS-1$
- return VERIFIED;
- }
- if (change.equals("UNCONFIRMED")) { //$NON-NLS-1$
- return UNCONFIRMED;
- }
- if (change.startsWith("NEEDINFO")) { //$NON-NLS-1$
- return NEEDINFO;
- }
- if (change.equals("WAITING")) { //$NON-NLS-1$
- return WAITING;
- }
- if (change.equals("SUSPENDED")) { //$NON-NLS-1$
- return SUSPENDED;
- }
- if (change.equals("MODIFIED")) { //$NON-NLS-1$
- return MODIFIED;
- }
- if (change.equals("POST")) { //$NON-NLS-1$
- return POST;
- }
- if (change.equals("INVESTIGATE")) { //$NON-NLS-1$
- return INVESTIGATE;
- }
- if (change.equals("PASSES_QA")) { //$NON-NLS-1$
- return PASSES_QA;
- }
- if (change.equals("PROD_READY")) { //$NON-NLS-1$
- return PROD_READY;
- }
- if (change.equals("RELEASE_PENDING")) { //$NON-NLS-1$
- return RELEASE_PENDING;
- }
- if (change.equals("ON_QA")) { //$NON-NLS-1$
- return ON_QA;
- }
- if (change.equals("QA_READY")) { //$NON-NLS-1$
- return QA_READY;
- }
- if (change.equals("FAILS_QA")) { //$NON-NLS-1$
- return FAILS_QA;
- }
- if (change.equals("SPEC")) { //$NON-NLS-1$
- return SPEC;
- }
- if (change.equals("") == false) { //$NON-NLS-1$
- System.err.println(MessageFormat.format(Messages.StatusType_Unknown_status_type_X, change));
- }
- return UNKNOWN;
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
deleted file mode 100644
index 71edf7e81..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskHistory.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * @author John Anvik
- */
-public class TaskHistory implements Iterable<TaskRevision>, Serializable {
-
- private static final long serialVersionUID = 1724420130243724426L;
-
- private final List<StatusEvent> statusEvents;
-
- private final List<ResolutionEvent> resolutionEvents;
-
- private final List<AssignmentEvent> assignmentEvents;
-
- private final List<TaskRevision> otherEvents;
-
- private final List<AttachmentEvent> attachmentEvents;
-
- public TaskHistory() {
- this.statusEvents = new ArrayList<StatusEvent>();
- this.resolutionEvents = new ArrayList<ResolutionEvent>();
- this.assignmentEvents = new ArrayList<AssignmentEvent>();
- this.attachmentEvents = new ArrayList<AttachmentEvent>();
- this.otherEvents = new ArrayList<TaskRevision>();
- }
-
- public void addEvent(TaskRevision event) {
- if (event instanceof StatusEvent) {
- this.statusEvents.add((StatusEvent) event);
- return;
- }
-
- if (event instanceof ResolutionEvent) {
- this.resolutionEvents.add((ResolutionEvent) event);
- return;
- }
-
- if (event instanceof AssignmentEvent) {
- this.assignmentEvents.add((AssignmentEvent) event);
- return;
- }
-
- if (event instanceof AttachmentEvent) {
- this.attachmentEvents.add((AttachmentEvent) event);
- return;
- }
- this.otherEvents.add(event);
- }
-
- private List<TaskRevision> getEvents() {
- List<TaskRevision> events = new ArrayList<TaskRevision>();
- events.addAll(this.statusEvents);
- events.addAll(this.resolutionEvents);
- events.addAll(this.assignmentEvents);
- events.addAll(this.attachmentEvents);
- events.addAll(this.otherEvents);
- Collections.sort(events);
- return events;
- }
-
- public Iterator<TaskRevision> iterator() {
- return getEvents().iterator();
- }
-
- public int size() {
- return this.otherEvents.size() + this.statusEvents.size() + this.resolutionEvents.size()
- + this.assignmentEvents.size();
- }
-
- @Override
- public String toString() {
- StringBuffer sb = new StringBuffer();
- for (Object event : this) {
- sb.append(event);
- sb.append("\n"); //$NON-NLS-1$
- }
- return sb.toString();
- }
-
- public List<StatusEvent> getStatusEvents() {
- return statusEvents;
- }
-
- public List<ResolutionEvent> getResolutionEvents() {
- return resolutionEvents;
- }
-
- public List<TaskRevision> getOtherEvents() {
- return otherEvents;
- }
-
- public List<AttachmentEvent> getAttachmentEvents() {
- return attachmentEvents;
- }
-
- public List<AssignmentEvent> getAssignmentEvents() {
- return assignmentEvents;
- }
-
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
deleted file mode 100644
index 54ab0c4c0..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/TaskRevision.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2004, 2008 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:
- * John Anvik - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.mylyn.internal.bugzilla.core.history;
-
-import java.io.Serializable;
-
-/**
- * @author John Anvik
- */
-public class TaskRevision implements Comparable<TaskRevision>, Serializable {
-
- private static final long serialVersionUID = 7739060501945994522L;
-
- protected final static String STATUS = "Status"; //$NON-NLS-1$
-
- protected final static String RESOLUTION = "Resolution"; //$NON-NLS-1$
-
- protected final static String ASSIGNMENT = "AssignedTo"; //$NON-NLS-1$
-
- protected final static String ATTACHMENT = "Attachment"; //$NON-NLS-1$
-
- protected String name;
-
- protected String date;
-
- protected String what;
-
- protected String removed;
-
- protected String added;
-
- protected TaskRevision() {
- this.added = ""; //$NON-NLS-1$
- }
-
- public static TaskRevision createEvent(String type, String change) {
- TaskRevision event = new TaskRevision();
-
- event.setWhat(type);
-
- if (STATUS.equals(type)) {
- event = new StatusEvent(StatusType.convert(change));
- }
-
- if (RESOLUTION.equals(type)) {
- event = new ResolutionEvent(ResolutionType.convert(change));
- }
-
- if (ASSIGNMENT.equals(type)) {
- event = new AssignmentEvent(change);
- }
-
- if (type.contains(ATTACHMENT) && type.contains("Flag")) { //$NON-NLS-1$
- event = new AttachmentEvent(AttachmentEvent.parseId(type), AttachmentEvent.parseFlags(change));
- }
-
- event.setAdded(change);
- return event;
- }
-
- private void setAdded(String added) {
- this.added = added;
- }
-
- public void setRemoved(String removed) {
- this.removed = removed;
- }
-
- private void setWhat(String what) {
- this.what = what;
- }
-
- public void setDate(String date) {
- this.date = date;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getAdded() {
- return this.added;
- }
-
- public String getRemoved() {
- return this.removed;
- }
-
- public String getWhat() {
- return this.what;
- }
-
- public String getDate() {
- return this.date;
- }
-
- public String getName() {
- return this.name;
- }
-
- @Override
- public String toString() {
- return this.name + " | " + this.date + " | " + this.what + " | " + this.removed + " | " + this.added; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- }
-
- public int compareTo(TaskRevision o) {
- return this.date.compareTo(o.getDate());
- }
-}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties
deleted file mode 100644
index 252356810..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/history/messages.properties
+++ /dev/null
@@ -1,12 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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
-###############################################################################
-ResolutionType_Unknown_resolution_type_X=Unknown resolution type: {0}
-StatusType_Unknown_status_type_X=Unknown status type: {0}
diff --git a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties b/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
deleted file mode 100644
index 5ebcca10a..000000000
--- a/org.eclipse.mylyn.bugzilla.core/src/org/eclipse/mylyn/internal/bugzilla/core/messages.properties
+++ /dev/null
@@ -1,132 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 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